How to make menu shortcuts to be visible all the time?
-
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(); }
-
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??
-
"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.