Results 1 to 2 of 2

Thread: Pixmap image movement/animation

  1. #1
    Join Date
    Dec 2018
    Qt products

    Default 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

  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 808 Times in 797 Posts
    Qt products
    Windows Android

    Default Re: Pixmap image movement/animation

    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.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 1
    Last Post: 3rd May 2017, 11:54
  2. Offset of a pixmap image
    By TheIndependentAquarius in forum Newbie
    Replies: 1
    Last Post: 30th October 2013, 12:38
  3. image source changes in animation
    By vinayaka in forum Qt Quick
    Replies: 0
    Last Post: 27th September 2011, 08:31
  4. Draw Image into Pixmap/Image
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 19th May 2010, 06:56
  5. Qt 3.3.8 pixmap to/from image error
    By ksierens in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2008, 06:46

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.