Results 1 to 2 of 2

Thread: Saving QLabel content in a file

  1. #1
    Join Date
    Mar 2006
    Posts
    142
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Saving QLabel content in a file

    Hello,
    I compute an animation and display the current frame in a QLabel using a QPainter. Now I would like to save the animation. It seems that there is nothing to build a .avi file or something like that in Qt but QImageWriter allows me to save the animation frame by frame. But now I have to convert the Label content to a QImage and then save the image in a file using QImageWriter (or at least this is the only way I have found to do it). So how to copy the QLabel content as a QImage?

  2. #2
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    1
    Thanked 9 Times in 9 Posts

    Default Re: Saving QLabel content in a file

    Hello!

    Please see QPixmap::grabWidget, it should help you

  3. The following user says thank you to pastor for this useful post:

    Caius Aérobus (29th October 2008)

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  2. Filtering blank spaces while saving file names
    By jyoti kumar in forum Qt Programming
    Replies: 1
    Last Post: 3rd September 2007, 06:53
  3. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.