Results 1 to 6 of 6

Thread: How to add a gif to a Qt Project?

  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to add a gif to a Qt Project?

    If i add an animated gif image to a label ( pixmap ) and then compile the application the movement of the animated gif image will not been show... How can it been shown?

    Take for example the attachment gif image....
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to add a gif to a Qt Project?

    The search function of this forum could be helpful. QMovie.

  3. #3
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to add a gif to a Qt Project?

    I had add this to the constructor and the label just do not show nothing... ( the part that is saying icons/bsusy.gif i had changed it to :/icons/bsusy.gif but still nothing )
    Qt Code:
    1. QLabel FlamesLabel;
    2. QMovie *movie = new QMovie("icons/bsusy.gif");
    3.  
    4. FlamesLabel.setMovie(movie);
    5. movie->start();
    To copy to clipboard, switch view to plain text mode 

    Any ideas?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to add a gif to a Qt Project?

    Is this your actual code? The label seems to be a local variable.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to add a gif to a Qt Project?

    Quote Originally Posted by wysota View Post
    Is this your actual code? The label seems to be a local variable.
    Yes this the actual code... Flames Lbel is the label i want to be on the backround

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to add a gif to a Qt Project?

    and why is it a local variable rather than on the heap?

    Show more of your code. What you are posting is unlikely to work as you expect.

Similar Threads

  1. cannot run the project
    By kazal in forum Qwt
    Replies: 0
    Last Post: 24th May 2010, 09:18
  2. new project
    By rk0747 in forum Qt Programming
    Replies: 5
    Last Post: 17th February 2010, 09:53
  3. Replies: 1
    Last Post: 4th December 2009, 00:34
  4. Qt Project How to ?
    By sunil.thaha in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2007, 11:56
  5. Project generation on linux from QT Project
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 10:43

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.