问题
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) Is it possible to flip an ordinary QLabel like this? If yes how do I do that?
2) If it's not possible then how do I add that Flipable entity to my QMainWindow?
Thanks, everyone
回答1:
You could use the QGraphicsPixmap with your image , set the rotation center with setTransformOriginPoint and animate the transformation matrix with QProertyAnimation
回答2:
There's no convenient way to do this. Desktop OS's don't provide this functionality.
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.
回答3:
Quick google search points me to a blog article where author of the video (Kunal Parmar) describing how this particular effect was done.
来源:https://stackoverflow.com/questions/13217380/how-to-flip-an-image-in-qt