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 make menu shortcuts to be visible all the time?
QtWS25 Last Chance

How to make menu shortcuts to be visible all the time?

Scheduled Pinned Locked Moved General and Desktop
menushortcuts
6 Posts 2 Posters 3.1k Views
  • 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.
  • Y Offline
    Y Offline
    YuriQ
    wrote on 27 Mar 2015, 07:54 last edited by
    #1

    Hello.
    Menu shortcuts are hidden until I press 'alt' key. I want them to be visible before I press 'alt' key too.

    Simple sample code (I run it in Windows 8.1 with Qt 5.4.1):

    #include <QApplication>
    #include <QMainWindow>
    #include <QMenuBar>
    #include <QMenu>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
    
        QMenu m1("File(&F)");
        QMenu m2("Edit(&E)");
        QMenu m3("Help(&H)");
    
        m1.addAction("close");
        m2.addAction("copy" );
        m3.addAction("about");
    
        QMainWindow mw;
        mw.menuBar()->addMenu(&m1);
        mw.menuBar()->addMenu(&m2);
        mw.menuBar()->addMenu(&m3);
    
        mw.setMinimumWidth(400);
        mw.show();
    
        return a.exec();
    }
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 27 Mar 2015, 21:07 last edited by
      #2

      Hi,

      this is a Windows policy not related to Qt.
      But IIRC there is a settings in Windows that make shortcuts always visible (sorry now I'm on a Mac and I cannot check).

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mcosta
        wrote on 27 Mar 2015, 21:21 last edited by
        #3

        FOUND

        Control Panel -> Ease of Access Center -> Make the keyboard easier to use -> Underline keyboard shortcuts and access keys

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        Y 1 Reply Last reply 29 Mar 2015, 09:22
        2
        • M mcosta
          27 Mar 2015, 21:21

          FOUND

          Control Panel -> Ease of Access Center -> Make the keyboard easier to use -> Underline keyboard shortcuts and access keys

          Y Offline
          Y Offline
          YuriQ
          wrote on 29 Mar 2015, 09:22 last edited by
          #4

          @mcosta
          Thanks, this works.
          But I still think this is related to Qt too. I tried the same code with earlier version of Qt (5.2.1). This time the program works as I expect (always shows menu shortcuts).

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mcosta
            wrote on 29 Mar 2015, 13:49 last edited by mcosta
            #5

            Hi,

            at the moment I can't try because I have no Windows machine available.

            I have only doubts that is related to Qt.
            Have rebuilt the same code with a different version of Qt?

            Running both versions of the application on the same machine shows you different results??

            Once your problem is solved don't forget to:

            • Mark the thread as SOLVED using the Topic Tool menu
            • Vote up the answer(s) that helped you to solve the issue

            You can embed images using (http://imgur.com/) or (http://postimage.org/)

            Y 1 Reply Last reply 29 Mar 2015, 17:06
            0
            • M mcosta
              29 Mar 2015, 13:49

              Hi,

              at the moment I can't try because I have no Windows machine available.

              I have only doubts that is related to Qt.
              Have rebuilt the same code with a different version of Qt?

              Running both versions of the application on the same machine shows you different results??

              Y Offline
              Y Offline
              YuriQ
              wrote on 29 Mar 2015, 17:06 last edited by YuriQ
              #6

              @mcosta

              "Have rebuilt the same code with a different version of Qt?" - yes, I did it
              "Running both versions of the application on the same machine shows you different results??" - yes
              I guess something has changed in Qt sources since version 5.3 or 5.4.

              I hope this thing (to show menu shortcuts) is tweakable via Qt API.

              1 Reply Last reply
              0

              6/6

              29 Mar 2015, 17:06

              • Login

              • Login or register to search.
              6 out of 6
              • First post
                6/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved