summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows/menus/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/mainwindows/menus/mainwindow.cpp')
-rw-r--r--examples/widgets/mainwindows/menus/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/widgets/mainwindows/menus/mainwindow.cpp b/examples/widgets/mainwindows/menus/mainwindow.cpp
index d487e3a277..fb06bc8ad0 100644
--- a/examples/widgets/mainwindows/menus/mainwindow.cpp
+++ b/examples/widgets/mainwindows/menus/mainwindow.cpp
@@ -83,6 +83,7 @@ MainWindow::MainWindow()
//! [2]
//! [3]
+#ifndef QT_NO_CONTEXTMENU
void MainWindow::contextMenuEvent(QContextMenuEvent *event)
{
QMenu menu(this);
@@ -91,6 +92,7 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(pasteAct);
menu.exec(event->globalPos());
}
+#endif // QT_NO_CONTEXTMENU
//! [3]
void MainWindow::newFile()