PDA

View Full Version : Saving QLabel content in a file



Caius Aérobus
29th October 2008, 16:58
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?

pastor
29th October 2008, 17:03
Hello!

Please see QPixmap::grabWidget, it should help you