Results 1 to 3 of 3

Thread: playing a movie in a label

  1. #1
    Join Date
    Mar 2008
    Posts
    68
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question playing a movie in a label

    How to play a gif image in a label...
    i tried using QMovie...but didnot get the image displayed when i said play.
    any other methods to play gifs in label...

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: playing a movie in a label

    Try setting the gif through HTML in the label.

    Also make sure ur Qt is compiled with gif support

    BTW, in the docs its given -
    Qt Code:
    1. QLabel label;
    2. QMovie *movie = new QMovie("animations/fire.gif");
    3.  
    4. label.setMovie(movie);
    5. movie->start();
    To copy to clipboard, switch view to plain text mode 
    Are you using same ??
    Last edited by jpn; 20th May 2008 at 08:05. Reason: changed [quote] to [code] tags

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: playing a movie in a label

    May we see the code? Did you, by any chance, allocate either QLabel or QMovie on the stack?
    J-P Nurmi

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.