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 can i do color labels in QMenu with Qss
Qt 6.11 is out! See what's new in the release blog

How can i do color labels in QMenu with Qss

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 6.2k 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.
  • R Offline
    R Offline
    Ruzik
    wrote on last edited by
    #1

    How can i do color labels in QMenu with Qss, i try many ways but cant do it

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tdmatsu
      wrote on last edited by
      #2

      Have you tried QMenu::item?

      http://doc.qt.nokia.com/latest/stylesheet-examples.html#customizing-qmenu

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Ruzik
        wrote on last edited by
        #3

        I try but it is dosnt worke

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Ruzik
          wrote on last edited by
          #4

          How can i set the font color for the any class?

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DenisKormalev
            wrote on last edited by
            #5

            You mean setting font color for all widgets? You can use
            @

            • {}
              @
            1 Reply Last reply
            0
            • T Offline
              T Offline
              tdmatsu
              wrote on last edited by
              #6

              Could you paste your Qss code which is not working?

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Ruzik
                wrote on last edited by
                #7

                I find it:
                @QMenu{
                color: red;
                }@
                Many thanks for your help!
                Is interesting why so, why developers dont make it is as:
                @font-color:@

                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