17 Sep
2004
17 Sep
'04
13:30
On Friday 17 September 2004 15:16, Prabu Subroto wrote:
Dear my friends...
I use SuSE 9.1 and Qt 3.2 . I am writing a database program with Qt.
I have an image file named "1.png", I want this image file displayed in a Dialog Form.
Anybody would be so generous to give me a very simple sample code how to display an image file into a Dialog Form with QImage?
All I know only this step : QImage::QImage("images/1.png");
Please give me a very simple sample code.
You can use QLabel, instead of giving it a textual label, you give it an pixmap. QLabel *lb = new QLabel(this); lb->setPixmap("images/1.png"); Insert the QLabel into your dialog as usual. best, Jeroen