Results 1 to 2 of 2

Thread: How stretch icon in QPushButton?

  1. #1
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How stretch icon in QPushButton?

    Hi,

    I got a QPushButton and added an image on it using stylesheet. Is there anyway to stretch the image like in QLabel setScaledContents? I'm searching for stylesheet syntax to stretch the image but i can't find any.

    Thanks.

  2. #2
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How stretch icon in QPushButton?

    Problem solved through reimplementing paintEvent.

Similar Threads

  1. QPushButton icon & dialog cursor
    By hulud in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th November 2009, 15:08
  2. QPushButton - Only show the Icon
    By graciano in forum Newbie
    Replies: 9
    Last Post: 19th September 2009, 21:15
  3. Problems with QPushButton displaying an icon
    By John82 in forum Qt Programming
    Replies: 9
    Last Post: 2nd July 2009, 17:42
  4. QPushButton Icon Image
    By QbelcorT in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2009, 14:26
  5. Stretching Icon in QPushButton
    By dsandber in forum Qt Tools
    Replies: 1
    Last Post: 6th October 2007, 16:51

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.