Results 1 to 4 of 4

Thread: Remove color when pushButton is selected

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

    Default Remove color when pushButton is selected

    Hi all

    I have a button with transparent icon over it, but when I click on that button it becomes selected and as usual OS put some color over it so we can know that button is selected. Is there a way to remove this color so I can have clean button when I click on it.

  2. #2
    Join Date
    Feb 2010
    Posts
    96
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Remove color when pushButton is selected

    setStyleSheet

    Qt Code:
    1. QPushButton:pressed { add your style here; }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Remove color when pushButton is selected

    Quote Originally Posted by alenn.masic View Post
    Hi all

    I have a button with transparent icon over it, but when I click on that button it becomes selected and as usual OS put some color over it so we can know that button is selected. Is there a way to remove this color so I can have clean button when I click on it.
    Set its focus policy to NoFocus.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Default Re: Remove color when pushButton is selected

    Quote Originally Posted by wysota View Post
    Set its focus policy to NoFocus.
    that's it. thanks

Similar Threads

  1. Remove selected rows from a QTableView
    By niko in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2016, 12:49
  2. Replies: 14
    Last Post: 2nd October 2012, 03:10
  3. background color of not selected tab
    By iridium in forum Qt Programming
    Replies: 0
    Last Post: 13th August 2009, 15:57
  4. Replies: 5
    Last Post: 2nd April 2007, 08:57
  5. Remove selected QListWidgetItem
    By xgoan in forum Newbie
    Replies: 7
    Last Post: 28th September 2006, 14:42

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.