Originally Posted by krivenok
- Everything you draw on a hidden widget will be discarded.
- Make sure you have JPEG image format plugin compiled
- The docs say:
Warning: Unless a widget has the Qt::WA_PaintOutsidePaintEvent attribute set. A QPainter can only be used on a widget inside a paintEvent() or a function called by a paintEvent(). On Mac OS X, you can only paint on a widget in a paintEvent() regardless of this attribute's setting.
If you want to show an image, use QLabel and the QLabel::setPixmap() method.
Bookmarks