Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to change a button's attribute to checkable and apply the disable stylistic
Forum Updated to NodeBB v4.3 + New Features

How to change a button's attribute to checkable and apply the disable stylistic

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 204 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by IknowQT
    #1

    I set the button to setcheckable(true).
    And if certain conditions are met, it is disabled.
    It is applied in the disable style. However, I would like to give the button that is checked a disable attribute separately. What should I do?

    usrCellTypeButton
    {
    	Text-align: center;
    	background-color: #ECEEF2;
    	border: 1px solid #ADAFB1;
    	color: #6B6C70;
    }
    usrCellTypeButton::pressed
    {
    	background-color: #D7D8DB;
    }
    usrCellTypeButton:checked 
    {
    	background-color: #467BBF;
    	color: #EFEAEE;
    }
    usrCellTypeButton:disabled 
    {
    	background-color: #E7EEF0;
    	border: 1px solid #D5D7D9;
    	color: #C5C6CA;
    }
    
    I 1 Reply Last reply
    0
    • I IknowQT

      I set the button to setcheckable(true).
      And if certain conditions are met, it is disabled.
      It is applied in the disable style. However, I would like to give the button that is checked a disable attribute separately. What should I do?

      usrCellTypeButton
      {
      	Text-align: center;
      	background-color: #ECEEF2;
      	border: 1px solid #ADAFB1;
      	color: #6B6C70;
      }
      usrCellTypeButton::pressed
      {
      	background-color: #D7D8DB;
      }
      usrCellTypeButton:checked 
      {
      	background-color: #467BBF;
      	color: #EFEAEE;
      }
      usrCellTypeButton:disabled 
      {
      	background-color: #E7EEF0;
      	border: 1px solid #D5D7D9;
      	color: #C5C6CA;
      }
      
      I Offline
      I Offline
      IknowQT
      wrote on last edited by
      #2

      @IknowQT said in How to change a button's attribute to checkable and apply the disable stylistic:

      usrCellTypeButton:checked

      usrCellTypeButton:disabled:checked
      

      I solved it using this property.

      1 Reply Last reply
      0

      • Login

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