summaryrefslogtreecommitdiff
path: root/tests/manual/examples/quick/webengineaction/main.cpp
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2023-03-17 17:26:39 +0100
committerMichal Klocek <michal.klocek@qt.io>2023-03-31 12:37:43 +0200
commitc87f97e566599563ecaf5cbaf4f75f3fb8f4655d (patch)
treed44f34d1be099486fcfd1c35b54b2a1def648146 /tests/manual/examples/quick/webengineaction/main.cpp
parent9937cbb4a0f43a799400f4057e8c695f88d1aa9f (diff)
downloadqtwebengine-c87f97e566599563ecaf5cbaf4f75f3fb8f4655d.tar.gz
Replace WebEngineAction example with a snippet
Also moves the example to the manual tests directory. Task-number: QTBUG-108751 Change-Id: Ie3fa492cfcaf61ee26ed65fa22954bb6a6532d6e Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> (cherry picked from commit 23d1131577e1780de0552211a84357bcb1f63de5)
Diffstat (limited to 'tests/manual/examples/quick/webengineaction/main.cpp')
-rw-r--r--tests/manual/examples/quick/webengineaction/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/manual/examples/quick/webengineaction/main.cpp b/tests/manual/examples/quick/webengineaction/main.cpp
new file mode 100644
index 000000000..a7bfaaf36
--- /dev/null
+++ b/tests/manual/examples/quick/webengineaction/main.cpp
@@ -0,0 +1,25 @@
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "utils.h"
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QQmlContext>
+#include <QtWebEngineQuick/qtwebenginequickglobal.h>
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication::setOrganizationName("QtExamples");
+ QtWebEngineQuick::initialize();
+
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ Utils utils;
+
+ engine.rootContext()->setContextProperty("utils", &utils);
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+
+ return app.exec();
+}