diff --git a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc index 3a9908ea612137e26e6d8da23a4213b21968f2f8..0239c1065689fe3c3afd6549d3f9db0b1bd2f0ec 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 417858d8d49bc44c67a8a16d8e2c7aaac07854a6..9981d177dd49cd3273f064e83b2a6978459976e5 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);