summaryrefslogtreecommitdiffstats
path: root/src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-22 15:16:16 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-23 15:40:28 +0200
commit0bcd8a6b8f96b214892fb296c6d6655ade43136f (patch)
tree29e7813151d1f658a6a4256a1240758f6a1c885e /src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp
parent6c6d0051dc3b206ac817c745a76822625830ef22 (diff)
Fix module specified for moved classes
Pick-to: 6.2 Change-Id: Iad93680dd0811086c481d9bf8adb298f663bdfa4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp')
-rw-r--r--src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp b/src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp
new file mode 100644
index 000000000..b948fa597
--- /dev/null
+++ b/src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+void wrapInFunction()
+{
+
+//! [0]
+ m_view->page()->findText(QStringLiteral("Qt"), QWebEnginePage::FindFlags(), [this](bool found) {
+ if (!found) QMessageBox::information(m_view, QString(), QStringLiteral("No occurrences found"));
+ });
+//! [0]
+
+}
+