Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.1
-
None
-
-
2025Season1QtforAndroid
Description
Just deploy this very simple program on an Android device:
#include <QApplication> #include <QMenuBar> #include <QMenu> #include <QMainWindow> #include <QLabel> int main( int argc, char* argv[] ) { QApplication app(argc, argv); QMainWindow wnd; wnd.menuBar()->addMenu( "File" )->addAction( "Hello World native action" ); wnd.setCentralWidget(new QLabel("Hello")); wnd.show(); return app.exec(); }
I tested various Android versions:
- On Android 6 and 10, the app menu is visible (see attached screenshot)
- On Android 9, the app menu is not visible (see attached screenshot)
App menu should always be visible.
Note: On Android 9, a workaround is too call `QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);` but then menu does not look very nice on an Android device.
Note, I tested both Qt 6.2 and 6.8, I see the same issue.