diff options
Diffstat (limited to 'src/widgets/widgets/qmenubar.cpp')
-rw-r--r-- | src/widgets/widgets/qmenubar.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index 45b7b3091a..99fddee53d 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -662,18 +662,6 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti the application's bundle. See \l{Qt for macOS - Deployment} for more information. - \section1 QMenuBar on Windows CE - - QMenuBar on Windows CE is a wrapper for using the system-wide menu bar, - similar to the Mac. This feature is activated for Windows Mobile - and integrates QMenuBar with the native soft keys. The left soft - key can be controlled with QMenuBar::setDefaultAction() and the - right soft key can be used to access the menu bar. - - The hovered() signal is not supported for the native menu - integration. Also, it is not possible to display an icon in a - native menu on Windows Mobile. - \section1 Examples The \l{mainwindows/menus}{Menus} example shows how to use QMenuBar @@ -1113,11 +1101,13 @@ void QMenuBar::keyPressEvent(QKeyEvent *e) key_consumed = false; } +#ifndef QT_NO_SHORTCUT if (!key_consumed && e->matches(QKeySequence::Cancel)) { d->setCurrentAction(0); d->setKeyboardMode(false); key_consumed = true; } +#endif if(!key_consumed && (!e->modifiers() || @@ -1425,6 +1415,7 @@ bool QMenuBar::event(QEvent *e) case QEvent::Show: d->_q_updateLayout(); break; +#ifndef QT_NO_SHORTCUT case QEvent::ShortcutOverride: { QKeyEvent *kev = static_cast<QKeyEvent*>(e); //we only filter out escape if there is a current action @@ -1434,8 +1425,7 @@ bool QMenuBar::event(QEvent *e) } } break; - - +#endif #ifndef QT_NO_WHATSTHIS case QEvent::QueryWhatsThis: e->setAccepted(d->whatsThis.size()); @@ -1793,10 +1783,9 @@ QWidget *QMenuBar::cornerWidget(Qt::Corner corner) const \brief Whether or not a menubar will be used as a native menubar on platforms that support it \since 4.6 - This property specifies whether or not the menubar should be used as a native menubar on platforms - that support it. The currently supported platforms are \macos and Windows CE. On these platforms - if this property is \c true, the menubar is used in the native menubar and is not in the window of - its parent, if false the menubar remains in the window. On other platforms the value of this + This property specifies whether or not the menubar should be used as a native menubar on \macos. + If this property is \c true, the menubar is used in the native menubar and is not in the window of + its parent, if \c false the menubar remains in the window. On other platforms the value of this attribute has no effect. The default is to follow whether the Qt::AA_DontUseNativeMenuBar attribute |