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 combine stylesheet descendant selector with property selector?

How to combine stylesheet descendant selector with property selector?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5.4.0windows 7stylesheet
2 Posts 1 Posters 1.5k 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.
  • J Offline
    J Offline
    Jakob
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jakob
      wrote on last edited by
      #2

      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?

      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