如何翻转Qt中的图像? [英] How to flip an image in 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屋!