How to make QPushButton auto highlight?



  • Actually i want to make QPushButton auto highlight when clicked, upon clicking i will open a new window/dialog/widget and do some activity, once it done when i close the window/dialog/widget the corresponding qpushbutton should be unhighlighted.



  • Try to add a Stylesheet for that.

    Maybe with this

    QPushButton:focus { background-color:blue; }
    

  • Qt Champions 2016

    Hi
    you can set the PushButton as checkable
    Then use the checked() to toggle on / off

    alt text


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.