Results 1 to 3 of 3

Thread: Transparent button icon

  1. #1
    Join Date
    Aug 2012
    Posts
    55
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Transparent button icon

    Hi all

    I have transparent button icon, it's transparent when I open it with picture viewer but when I import it in Qt and set it as button icon it's not transparent anymore. How to fix this.

    I'm setting icon like this:

    QPushButton button = new QPushButton(QIcon("image-path"), "Button-text", this);

  2. #2
    Join Date
    Mar 2011
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Transparent button icon

    How do you know it is not transparent, are the transparent areas being rendered white?

  3. #3
    Join Date
    Aug 2012
    Posts
    55
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Transparent button icon

    I know because I'm supposed to see image behind button. And yes, it's rendered white.

Similar Threads

  1. Replies: 2
    Last Post: 26th April 2011, 11:44
  2. Button icon and text
    By electronicboy in forum Qt Programming
    Replies: 5
    Last Post: 9th October 2009, 22:27
  3. button with backgr and icon using stylesheets
    By s_p_t10 in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2008, 20:19
  4. icon out of button
    By mattia in forum Newbie
    Replies: 17
    Last Post: 28th March 2008, 14:56
  5. Icon only button
    By bruccutler in forum Newbie
    Replies: 9
    Last Post: 19th January 2007, 19:20

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
  •  
Qt is a trademark of The Qt Company.