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?
Forum Updated to NodeBB v4.3 + New Features

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 2 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.
  • Y Offline
    Y Offline
    YuriQ
    wrote on 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 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 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
        2
        • M mcosta

          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 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 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
            0
            • M mcosta

              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 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

              • Login

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