diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-03-28 15:03:50 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-04-27 09:30:34 +0000 |
commit | 7849aa6e96aa923fca5523afc8cf88edcc0bcf90 (patch) | |
tree | 0aa4e3fec94df70483fe5a25f9d5a82fdc01bfe8 /src/gui/kernel/qguiapplication.cpp | |
parent | 121a30ccef3b6306c1da4f415fe1305dbf2dd901 (diff) |
Windows QPA: Add native menus
Add simple Win32-API based menus (not owner-drawn).
Native menus are implemented using Win32 API and are simpler than
QMenu-based menus in for example that they do allow for placing widgets on
them or changing properties like fonts and do not provide hover signals.
They are mainly intended for Qt Quick. By default, they will be used if the
application is not an instance of QApplication or for Qt Quick Controls
2 applications.
In addition, the command line option -platform windows:menus=native
will unconditionally activate them and -platform windows:menus=no
turns them off.
[ChangeLog][QtGui][Windows] Native menus have been implemented.
Task-number: QTBUG-55967
Change-Id: I439a7d949745debea3eb0e5789cf42288a0d526f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 56f112c36c..23c11fe212 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -570,6 +570,15 @@ static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOME \li \c {dialogs=[xp|none]}, \c xp uses XP-style native dialogs and \c none disables them. \li \c {fontengine=freetype}, uses the FreeType font engine. + \li \c {menus=[native|none]}, controls the use of native menus. + + Native menus are implemented using Win32 API and are simpler than + QMenu-based menus in for example that they do allow for placing + widgets on them or changing properties like fonts and do not + provide hover signals. They are mainly intended for Qt Quick. + By default, they will be used if the application is not an + instance of QApplication or for Qt Quick Controls 2 + applications. \endlist For more information about the platform-specific arguments available for |