View Full Version : Bitmap on Push Button in QT 3
Gokulnath
12th January 2011, 05:18
How to set a Bitmap on the Push Button ??? pls help me..:(
tbscope
12th January 2011, 05:24
http://doc.qt.nokia.com/3.3/qbutton.html#pixmap-prop
And if this fails you can create an iconset.
Gokulnath
12th January 2011, 07:34
QPushButton *mainImage;
mainImage = new QPushButton(this);
mainImage->move(25,210);
mainImage->setIconSize(QSize(100,160));
mainImage->setGeometry(70,10,100,160);
mainImage->setFocusPolicy(Qt::TabFocus);
mainImage->show();
QString ImagePath;
ImagePath = "C:\\Documents and Settings\\cgvak\\Desktop\\fun1.bmp";
QPixmap imagedisplay(ImagePath);
QIcon icon(imagedisplay);
mainImage->setIcon(icon);;);)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.