Results 1 to 2 of 2

Thread: QPushButton

  1. #1
    Join Date
    Jan 2008
    Posts
    91
    Thanks
    8

    Default QPushButton

    Dear Friends,
    I want to add a pixmap to QPushButton and draw it as QIcon, and add a text under QIcon,

    QPushButton size is (100,100) QIcon size is 64x64 , How may I draw Icon at pos(10,10)
    then drawtext under Icon?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QPushButton

    Quote Originally Posted by anafor2004 View Post
    How may I draw Icon at pos(10,10)
    then drawtext under Icon?
    Subclass and do the drawing yourself or better use QToolButton, because this class does exactly what you want.

Similar Threads

  1. Adding Image to QPushButton
    By Seema Rao in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2011, 09:06
  2. Stylesheets & QPushButton menus
    By zuck in forum Qt Programming
    Replies: 5
    Last Post: 3rd November 2011, 15:40
  3. Change QPushButton Background Color, Qt4.3
    By Rayven in forum Qt Programming
    Replies: 5
    Last Post: 4th July 2009, 07:14
  4. Adding QPushButton to *.ui file by hand
    By s410i in forum Qt Programming
    Replies: 3
    Last Post: 23rd June 2009, 13:08
  5. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 04:40

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.