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. Change QMenu Shortcut text color
Forum Updated to NodeBB v4.3 + New Features

Change QMenu Shortcut text color

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 418 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.
  • A Offline
    A Offline
    APSH
    wrote last edited by
    #1

    How can I change the color of QMenu shortcuts and make them align from the right side?
    Stylesheets don’t seem to affect the shortcut text

    I 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      Did you follow the example from the documentation ?

      If so, please provide a minimal compilable example that shows your issue.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A APSH

        How can I change the color of QMenu shortcuts and make them align from the right side?
        Stylesheets don’t seem to affect the shortcut text

        I Offline
        I Offline
        IgKh
        wrote last edited by
        #3

        @APSH Which Qt version? Which operating system?

        On some platforms Qt uses native menus by default, which can't be styled to the extent non-native menus can.

        A 1 Reply Last reply
        0
        • A Offline
          A Offline
          APSH
          wrote last edited by
          #4

          How can I set different colors for the QAction text and its key sequence (for example, action text in black and keysequence in gray)

          1 Reply Last reply
          0
          • I IgKh

            @APSH Which Qt version? Which operating system?

            On some platforms Qt uses native menus by default, which can't be styled to the extent non-native menus can.

            A Offline
            A Offline
            APSH
            wrote last edited by
            #5

            @IgKh Hi
            I am using Ubuntu OS version 22.04.5 LTS and QT 6.8.3.
            Is that not supported for customizing QMenu and it's keysequence?

            Christian EhrlicherC 1 Reply Last reply
            0
            • A APSH

              @IgKh Hi
              I am using Ubuntu OS version 22.04.5 LTS and QT 6.8.3.
              Is that not supported for customizing QMenu and it's keysequence?

              Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote last edited by
              #6

              @APSH said in Change QMenu Shortcut text color:

              Is that not supported for customizing QMenu and it's keysequence?

              no - it's one text

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              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