Pixmap image movement/animation
Hello, I just wanted to ask how can you move a pixmap image in a .ui file?
I've already inputted the image in a .ui file but I just don't know how I can move and control the speed of it. I'm still in the process of trying to understand scene coordination, QgraphicsScene, QgraphicsPixmapItem, QgraphicsView, and other things that relates to animation.
I'll appreciate any tips from you guys. Thank you so much
Re: Pixmap image movement/animation
Quote:
I've already inputted the image in a .ui file
I don't think you want to put pixmap images into the UI file. UI files created using Qt Designer are generally used for parts of the user interface that do not change. About the only time you would use an image would be if it was part of a QLabel background or an icon.
Instead, you want to add your images as resources in a Qt resource file (.qrc). The qrc file is compiled into your program as data, so you do not need the original image files at run time. You will load the images from the resource file. Read about qrc files in the Qt documentation.
In the Qt Animated Tiles example, the images for the tiles are stored in the qrc file.