How to combine stylesheet descendant selector with property selector?



  • I had expected the following would work:

    *[styleAsPresetPanel="true"] QPushButton,
    *[styleAsPresetPanel="true"] QCheckBox
    {
       /* stylesheet */
    }
    

    This would mean that stylesheet would need to apply to any QPushButton or QCheckBox that is a descendant of any object that has the dynamic property styleAsPresetPanel set to true.

    Am I trying to do something that is simply not possible, or do I need to change the syntax?



  • I just noted that without the '*' it does work, in other words, the following works:

    QFrame[styleAsPresetPanel="true"] QPushButton,
    QFrame[styleAsPresetPanel="true"] QCheckBox
    {
        /* stylesheet */
    }
    

    Allthough this is enough for me to continue for now, my original question remains. I'd expect this to work with the '*' as well, but that doesn't seem to work. Is that a bug I should file, or are my expectations wrong?


Log in to reply
 

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