PDA

View Full Version : Saving a QPainter



xgoan
8th August 2006, 12:41
I need save a Widget where I have draw something to a Image file, how can I do it?

Thanks :)

Mike
8th August 2006, 13:24
You are not very specific about your problem. But I assume that you're talking about a series of points that were drawn on your image. In that case you would save the x and y coordinates of each point into a file. Then when you open the image, you can simply redraw the path by painting the list of points again onto the image...

jacek
8th August 2006, 13:36
You can also use QPicture or just paint on QPixmap and then copy it to the widget. There is also QPixmap::grabWidget().