summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc9
-rw-r--r--examples/webenginewidgets/markdowneditor/mainwindow.cpp1
2 files changed, 8 insertions, 2 deletions
diff --git a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
index 3a9908ea6..0239c1065 100644
--- a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
+++ b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
@@ -113,11 +113,16 @@
\quotefromfile webenginewidgets/markdowneditor/mainwindow.cpp
\skipto MainWindow::MainWindow
- \printto connect
+ \printto PreviewPage
The constructor first calls \c setupUi to construct the widgets and menu
actions according to the UI file. The text editor font is set to one
- with a fixed character width. It then makes sure our custom
+ with a fixed character width, and the QWebEngineView widget is told not
+ to show a context menu.
+
+ \printto connect
+
+ Here the constructor makes sure our custom
\c PreviewPage is used by the QWebEngineView instance in \c{ui->preview}.
\printto ui->preview
diff --git a/examples/webenginewidgets/markdowneditor/mainwindow.cpp b/examples/webenginewidgets/markdowneditor/mainwindow.cpp
index 417858d8d..9981d177d 100644
--- a/examples/webenginewidgets/markdowneditor/mainwindow.cpp
+++ b/examples/webenginewidgets/markdowneditor/mainwindow.cpp
@@ -65,6 +65,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
ui->editor->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
+ ui->preview->setContextMenuPolicy(Qt::NoContextMenu);
PreviewPage *page = new PreviewPage(this);
ui->preview->setPage(page);