diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2014-04-01 18:27:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-25 15:18:29 +0200 |
commit | c7ed644fd1979b5a8c29fae1005d8a70801fab14 (patch) | |
tree | 07e01945355ca65152917615d0043344b88ce082 /src/widgets/widgets/qmenu_p.h | |
parent | 379042b84c74988ef5cadfe592aa202a2ebf9c61 (diff) |
QMenu: Add support for QWidgetAction on Mac
The implementation follows a similar logic as in Qt 4
making sure we properly interface with the QPA backend.
We also make sure to delay moving the action widget to
the QPA menu until it's about to show. We still don't
support moving the action widget back from QPA world
into Qt, as explained in the QWidgetAction documentation.
Task-number: QTBUG-19840
Change-Id: I47f6359b0806f967d80c67fbb1f36c3d5ec8603e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/widgets/widgets/qmenu_p.h')
-rw-r--r-- | src/widgets/widgets/qmenu_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h index 9d9851af64..71bf33e1ce 100644 --- a/src/widgets/widgets/qmenu_p.h +++ b/src/widgets/widgets/qmenu_p.h @@ -110,6 +110,9 @@ public: void init(); void setPlatformMenu(QPlatformMenu *menu); void syncPlatformMenu(); +#ifdef Q_OS_OSX + void moveWidgetToPlatformItem(QWidget *w, QPlatformMenuItem* item); +#endif static QMenuPrivate *get(QMenu *m) { return m->d_func(); } int scrollerHeight() const; @@ -223,6 +226,7 @@ public: void _q_actionTriggered(); void _q_actionHovered(); + void _q_platformMenuAboutToShow(); bool hasMouseMoved(const QPoint &globalPos); |