Results 1 to 3 of 3

Thread: Bitmap on Push Button in QT 3

  1. #1
    Join Date
    Jan 2011
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Bitmap on Push Button in QT 3

    How to set a Bitmap on the Push Button ??? pls help me..

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Bitmap on Push Button in QT 3

    http://doc.qt.nokia.com/3.3/qbutton.html#pixmap-prop

    And if this fails you can create an iconset.

  3. #3
    Join Date
    Jan 2011
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default SOLVED: Bitmap on Push Button in QT 3

    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);

Similar Threads

  1. [QT]Push button-no action
    By nqn in forum Newbie
    Replies: 4
    Last Post: 30th May 2010, 19:08
  2. Hareware Push Button
    By mickeyk191 in forum Newbie
    Replies: 2
    Last Post: 26th January 2010, 12:41
  3. A very small push button
    By Gnurou in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2009, 03:04
  4. shape of push button
    By Seema Rao in forum Qt Programming
    Replies: 23
    Last Post: 2nd April 2008, 01:05
  5. Push Button problem!!
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2006, 16:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.