Results 1 to 2 of 2

Thread: Pixmap image movement/animation

  1. #1
    Join Date
    Dec 2018
    Posts
    9
    Thanks
    7
    Qt products
    Qt5
    Platforms
    Windows

    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
    Location
    Alameda, CA, USA
    Posts
    4,165
    Thanks
    235
    Thanked 662 Times in 652 Posts
    Qt products
    Qt5
    Platforms
    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, 12:54
  2. Offset of a pixmap image
    By TheIndependentAquarius in forum Newbie
    Replies: 1
    Last Post: 30th October 2013, 13:38
  3. image source changes in animation
    By vinayaka in forum Qt Quick
    Replies: 0
    Last Post: 27th September 2011, 09:31
  4. Draw Image into Pixmap/Image
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 19th May 2010, 07:56
  5. Qt 3.3.8 pixmap to/from image error
    By ksierens in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2008, 07:46

Tags for this Thread

Bookmarks

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.