Push-button highlight problem after press
-
Hi all!
I have problem when I press any push-button ,on Qt Designer, the effect of press is still exist after action. See the pictures below.Before action (press):
After action (pressed)
How I can remove it? is it by python code or from Qt Design itself?
Thanks
-
try adding somthing like that to qss
.QPushButton { border: 2px solid rgb(52, 59, 72); border-radius: 5px; background-color: rgb(52, 59, 72); } .QPushButton:hover { background-color: rgb(57, 65, 80); border: 2px solid rgb(61, 70, 86); } .QPushButton:pressed { background-color: rgb(35, 40, 49); border: 2px solid rgb(43, 50, 61); }
you can also specify a specific Object id like this:
#pagesContainer_center QPushButton { border: 2px solid rgb(52, 59, 72); border-radius: 5px; background-color: rgb(52, 59, 72); } #pagesContainer_center QPushButton:hover { background-color: rgb(57, 65, 80); border: 2px solid rgb(61, 70, 86); } #pagesContainer_center QPushButton:pressed { background-color: rgb(35, 40, 49); border: 2px solid rgb(43, 50, 61); }
now all this will affect only childs of
pagesContainer_center
-
try adding somthing like that to qss
.QPushButton { border: 2px solid rgb(52, 59, 72); border-radius: 5px; background-color: rgb(52, 59, 72); } .QPushButton:hover { background-color: rgb(57, 65, 80); border: 2px solid rgb(61, 70, 86); } .QPushButton:pressed { background-color: rgb(35, 40, 49); border: 2px solid rgb(43, 50, 61); }
you can also specify a specific Object id like this:
#pagesContainer_center QPushButton { border: 2px solid rgb(52, 59, 72); border-radius: 5px; background-color: rgb(52, 59, 72); } #pagesContainer_center QPushButton:hover { background-color: rgb(57, 65, 80); border: 2px solid rgb(61, 70, 86); } #pagesContainer_center QPushButton:pressed { background-color: rgb(35, 40, 49); border: 2px solid rgb(43, 50, 61); }
now all this will affect only childs of
pagesContainer_center