From 7849aa6e96aa923fca5523afc8cf88edcc0bcf90 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 28 Mar 2017 15:03:50 +0200 Subject: 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 --- src/plugins/platforms/windows/qwindowstheme.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/platforms/windows/qwindowstheme.h') diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h index a3019ff6eb..7ce3023111 100644 --- a/src/plugins/platforms/windows/qwindowstheme.h +++ b/src/plugins/platforms/windows/qwindowstheme.h @@ -74,6 +74,13 @@ public: QList availableFileIconSizes() const { return m_fileIconSizes; } + QPlatformMenuItem *createPlatformMenuItem() const override; + QPlatformMenu *createPlatformMenu() const override; + QPlatformMenuBar *createPlatformMenuBar() const override; + void showPlatformMenuBar() override; + + static bool useNativeMenus(); + static const char *name; private: -- cgit v1.2.3