Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Push-button highlight problem after press
Forum Updated to NodeBB v4.3 + New Features

Push-button highlight problem after press

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 499 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • monamourM Offline
    monamourM Offline
    monamour
    wrote on last edited by
    #1

    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):

    before press.JPG

    After action (pressed)

    after press.JPG

    How I can remove it? is it by python code or from Qt Design itself?

    Thanks

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NYBL
      wrote on last edited by NYBL
      #2

      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

      monamourM 1 Reply Last reply
      2
      • N NYBL

        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

        monamourM Offline
        monamourM Offline
        monamour
        wrote on last edited by
        #3

        @NYBL Thank you so much. I appreciate it.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved