I would like to have logical AND comparison using dynamic properties, but can't figure out the syntax, or if it is even possible.
Lets say I want to do something special to a QPushButton if it has both an icon and text. I know how/when to set the peoperties but can't figure out the stylesheet syntax.
First I set these separate cases fine:
MyButton[hasIcon="true"] {background-color: pink;}
MyButton[hasText="true"] {background-color: blue;}
MyButton[hasIcon="true"] {background-color: pink;}
MyButton[hasText="true"] {background-color: blue;}
To copy to clipboard, switch view to plain text mode
But none of these will set the background to green:
MyButton[hasIcon="true"] MyButton[hasText="true"] {background-color: green;}
MyButton[hasIcon="true"],[hasText="true"] {background-color: green;}
MyButton[hasIcon="true"][hasText="true"] {background-color: green;}
MyButton[hasIcon="true"] MyButton[hasText="true"] {background-color: green;}
MyButton[hasIcon="true"],[hasText="true"] {background-color: green;}
MyButton[hasIcon="true"][hasText="true"] {background-color: green;}
To copy to clipboard, switch view to plain text mode
If it isn't possible could someone please let me know so I can stop chasing my tail?
Bookmarks