Create a QWidget The use the setPaletteBackgroundPixmap() to set it's background image (pixmap) to your file. QWidget* wig = new QWidget(this); wig->setPaletteBackgroundPixmap(QPixmap::QPixmap(QImage::QImage("images/1.png"))); wig->show(); B-) On Friday 17 September 2004 07:16 am, 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.
Thank you very much in advance.
_______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com