如何翻转Qt中的图像? [英] How to flip an image in Qt?

查看:540
本文介绍了如何翻转Qt中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在YouTube上找到该视频。它显示如何翻转的东西叫QML Flipable。我完全不熟悉QML,所以我有以下问题:

I found that video on Youtube. It shows how to flip something called QML Flipable. I'm completely unfamiliar with QML so I have the following questions:

1)有可能翻转一个普通的QLabel像这样吗?如果是,我该如何做?

1) Is it possible to flip an ordinary QLabel like this? If yes how do I do that?

2)如果不可能,那么如何将Flipable实体添加到我的QMainWindow?

2) If it's not possible then how do I add that Flipable entity to my QMainWindow?

感谢大家

推荐答案

没有方便的方法。桌面操作系统不提供此功能。

There's no convenient way to do this. Desktop OS's don't provide this functionality.

一个选项是使用QGraphicsView。您可以使用 QGraphicsScene :: addWidget()为QGraphicsScene添加小部件,例如,然后按您想要的方式转换视图。

One option is to use QGraphicsView. You can add widgets to a QGraphicsScene using QGraphicsScene::addWidget(), for example, and then transform the view the way you want.

这篇关于如何翻转Qt中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆