summaryrefslogtreecommitdiffstats
path: root/src/core/doc/snippets/qtwebengine_qwebenginepage_snippet.cpp
blob: 6b39eed035b0b6308f3dbf79ab923e99f0a34ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

void wrapInFunction()
{

//! [0]
    m_view->page()->findText(QStringLiteral("Qt"), QWebEnginePage::FindFlags(), [this](const QWebEngineFindTextResult &result) {
        if (result.numberOfMatches() == 0) QMessageBox::information(m_view, QString(), QStringLiteral("No occurrences found"));
    });
//! [0]

}