diff options
Diffstat (limited to 'examples/widgets/mainwindows/mainwindow')
-rw-r--r-- | examples/widgets/mainwindows/mainwindow/colorswatch.cpp | 2 | ||||
-rw-r--r-- | examples/widgets/mainwindows/mainwindow/colorswatch.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp index d746bbe8d3..cd0543ecd9 100644 --- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp +++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp @@ -468,11 +468,13 @@ void ColorSwatch::tabInto(QAction *action) mainWindow->tabifyDockWidget(target, this); } +#ifndef QT_NO_CONTEXTMENU void ColorSwatch::contextMenuEvent(QContextMenuEvent *event) { event->accept(); menu->exec(event->globalPos()); } +#endif // QT_NO_CONTEXTMENU void ColorSwatch::resizeEvent(QResizeEvent *e) { diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.h b/examples/widgets/mainwindows/mainwindow/colorswatch.h index 8827a7dca7..251807d60f 100644 --- a/examples/widgets/mainwindows/mainwindow/colorswatch.h +++ b/examples/widgets/mainwindows/mainwindow/colorswatch.h @@ -51,7 +51,9 @@ public: QMenu *colorSwatchMenu() const { return menu; } protected: +#ifndef QT_NO_CONTEXTMENU void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE; +#endif // QT_NO_CONTEXTMENU void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE; private slots: |