PDA

View Full Version : QLabel as an image.



RSX
4th April 2009, 19:16
Hi, I want in my MainWindow have an image and depending on user actions, it will change to different ones. So, I put in designer a QLabel and set in QLabels pixmap my image. Now when I run my program the QLabel works (tool tip is poping up), but the image isn't drawn. Any ideas what I need to do?

PaceyIV
4th April 2009, 19:32
Look at Image Viewer Example http://doc.trolltech.com/4.2/widgets-imageviewer.html.
It works?

RSX
4th April 2009, 20:22
Well, yes. If I set the pixmap in constructor, my image is drawn. I guess I gotta do it this way.