diff options
| author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-07-04 12:33:13 +0200 |
|---|---|---|
| committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-07-04 16:14:08 +0200 |
| commit | fdac10eb0db071f7d6afbe08122b0c5160f6d663 (patch) | |
| tree | 6c149431f5e45517d83d6b6898d4e16777dbc305 /tests/manual/quickcontrols/testbench/main.cpp | |
| parent | eb3a71007d3aeebcfe14f20191f6a51b44b00e6a (diff) | |
testbench: don't use native menus or menubars
The purpose of the tool is to show the styled controls.
So don't use native menus or menubars. Also, since the
menubar will warn (since Qt 6.8) if you add a MenuBarItem
to a MenuBar without a Menu, give each MenuBarItem a dummy
menu.
Pick-to: 6.8
Change-Id: I51972deea0308e7c994460ab4c6cca4fa9b5a9ab
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'tests/manual/quickcontrols/testbench/main.cpp')
| -rw-r--r-- | tests/manual/quickcontrols/testbench/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/manual/quickcontrols/testbench/main.cpp b/tests/manual/quickcontrols/testbench/main.cpp index 14da6e7b2c..f0ae272cd9 100644 --- a/tests/manual/quickcontrols/testbench/main.cpp +++ b/tests/manual/quickcontrols/testbench/main.cpp @@ -18,6 +18,8 @@ int main(int argc, char *argv[]) { QGuiApplication::setApplicationName("testbench"); QGuiApplication::setOrganizationName("QtProject"); + QGuiApplication::setAttribute(Qt::AA_DontUseNativeMenuBar); + QGuiApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows); QGuiApplication app(argc, argv); |
