[Qt-interest] Render hidden widget to QPixmap

Liebe Markus (RtP2/TEF72) Markus.Liebe at de.bosch.com
Mon Feb 8 14:35:55 CET 2010


Hi there,

I want to use Qwidget::render() to create a Pixmap containing the contents of a hidden Qwidget foo which was not shown on the screen before.
This does not work for me. I figured out that I have to use foo->show() to display the widget on the screen before I am able to render the contents to the Qpixmap.
Otherwise I do not get a Qpixmap with the correct contents, it is just plain gray....

In my particular situation I am not able to show the widget on screen before. So is there any way to render a hidden widget to a Qpixmap?

Regards,

Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100208/265f71c6/attachment.html 


More information about the Qt-interest-old mailing list