summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-03-17 10:34:53 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-22 12:48:41 +0000
commit7d9805df3a471e7172bf72ff1bc08c63ccfd67fa (patch)
treefee4dca1f5f8991c2b1d5736da38ac072ee3cbad /examples
parent37b04eeb90063b9845d4b6154fa3bc7e36ebdf0c (diff)
downloadqtwebengine-7d9805df3a471e7172bf72ff1bc08c63ccfd67fa.tar.gz
Move quick minimal example to manual tests
Task-number: QTBUG-108751 Change-Id: I0998c46f051908855e0406e5fc7c0a422dc3eef0 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit ed76eef004dbac15f4740d33d06d2b271bf770d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginequick/CMakeLists.txt1
-rw-r--r--examples/webenginequick/minimal/CMakeLists.txt48
-rw-r--r--examples/webenginequick/minimal/doc/src/minimal.qdoc63
-rw-r--r--examples/webenginequick/minimal/main.cpp20
-rw-r--r--examples/webenginequick/minimal/main.qml16
-rw-r--r--examples/webenginequick/minimal/minimal.pro10
-rw-r--r--examples/webenginequick/minimal/qml.qrc6
-rw-r--r--examples/webenginequick/webenginequick.pro1
8 files changed, 0 insertions, 165 deletions
diff --git a/examples/webenginequick/CMakeLists.txt b/examples/webenginequick/CMakeLists.txt
index 14d2f5b51..4b64c2926 100644
--- a/examples/webenginequick/CMakeLists.txt
+++ b/examples/webenginequick/CMakeLists.txt
@@ -4,7 +4,6 @@
qt_internal_add_example(customdialogs)
qt_internal_add_example(customtouchhandle)
qt_internal_add_example(lifecycle)
-qt_internal_add_example(minimal)
qt_internal_add_example(quicknanobrowser)
qt_internal_add_example(webengineaction)
if(TARGET Qt::QuickControls2)
diff --git a/examples/webenginequick/minimal/CMakeLists.txt b/examples/webenginequick/minimal/CMakeLists.txt
deleted file mode 100644
index f4715bb97..000000000
--- a/examples/webenginequick/minimal/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.16)
-project(minimal LANGUAGES CXX)
-
-set(CMAKE_AUTOMOC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginequick/minimal-qml")
-
-find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineQuick)
-
-qt_add_executable(webengine-minimal-qml
- main.cpp
-)
-
-set_target_properties(webengine-minimal-qml PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-
-target_link_libraries(webengine-minimal-qml PUBLIC
- Qt::Core
- Qt::Gui
- Qt::WebEngineQuick
-)
-
-# Resources:
-set(qml_resource_files
- "main.qml"
-)
-
-qt_add_resources(webengine-minimal-qml "qml"
- PREFIX
- "/"
- FILES
- ${qml_resource_files}
-)
-
-install(TARGETS webengine-minimal-qml
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/webenginequick/minimal/doc/src/minimal.qdoc b/examples/webenginequick/minimal/doc/src/minimal.qdoc
deleted file mode 100644
index aed74a7f5..000000000
--- a/examples/webenginequick/minimal/doc/src/minimal.qdoc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \example webenginequick/minimal
- \title WebEngine Qt Quick Minimal Example
- \ingroup webengine-examples
- \brief Displays a web page using the Qt Quick integration of \QWE.
-
- \image minimal-example.png
-
- \e {WebEngine Qt Quick Minimal Example} demonstrates how to use the
- \l{WebEngineView} item to render a web page. It shows the minimum amount of
- code needed to load and display an HTML page, and can be used as a basis for
- further experimentation.
-
- \include examples-run.qdocinc
-
- \section1 C++ Code
-
- In \c main.cpp we use only the QGuiApplication and QQmlApplicationEngine
- classes. We also include \c qtwebengineglobal.h to be able to use
- \l{QtWebEngineQuick::initialize}.
-
- \quotefromfile webenginequick/minimal/main.cpp
- \skipto #include
- \printto main
-
- In the \c main function we first set the
- \l{QCoreApplication::organizationName} property. This affects the locations
- where \QWE stores persistent and cached data (see also
- \l{WebEngineProfile::cachePath} and
- \l{WebEngineProfile::persistentStoragePath}).
-
- Next, we call \l{QtWebEngineQuick::initialize}, which makes sure that OpenGL
- contexts can be shared between the main process and the dedicated renderer
- process (\c QtWebEngineProcess). This method needs to be called before
- any OpenGL context is created.
-
- Then we create a QQmlApplicationEngine, and tell it to load \c main.qml
- from the \l{The Qt Resource System}{Qt Resource System}.
-
- Finally, QGuiApplication::exec() launches the main event loop.
-
- \printuntil }
-
- \section1 QML Code
-
- In \c main.qml we create the top level window, set a sensible default size
- and make it visible. The window will be filled by a WebEngineView item
- loading the \l{Qt Homepage}.
-
- \quotefromfile webenginequick/minimal/main.qml
- \skipto import
- \printuntil }
- \printline }
-
- \section1 Requirements
-
- The example requires a working internet connection to render the
- \l{Qt Homepage}.
- An optional system proxy should be picked up automatically.
-*/
diff --git a/examples/webenginequick/minimal/main.cpp b/examples/webenginequick/minimal/main.cpp
deleted file mode 100644
index 47b3e146a..000000000
--- a/examples/webenginequick/minimal/main.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QGuiApplication>
-#include <QQmlApplicationEngine>
-#include <QtWebEngineQuick/qtwebenginequickglobal.h>
-
-int main(int argc, char *argv[])
-{
- QCoreApplication::setOrganizationName("QtExamples");
- QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
- QtWebEngineQuick::initialize();
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
-
- return app.exec();
-}
-
diff --git a/examples/webenginequick/minimal/main.qml b/examples/webenginequick/minimal/main.qml
deleted file mode 100644
index a8733a8c8..000000000
--- a/examples/webenginequick/minimal/main.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-import QtQuick
-import QtQuick.Window
-import QtWebEngine
-
-Window {
- width: 1024
- height: 750
- visible: true
- WebEngineView {
- anchors.fill: parent
- url: "https://www.qt.io"
- }
-}
diff --git a/examples/webenginequick/minimal/minimal.pro b/examples/webenginequick/minimal/minimal.pro
deleted file mode 100644
index acca6477c..000000000
--- a/examples/webenginequick/minimal/minimal.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-
-QT += webenginequick
-
-SOURCES += main.cpp
-
-RESOURCES += qml.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/webenginequick/minimal
-INSTALLS += target
diff --git a/examples/webenginequick/minimal/qml.qrc b/examples/webenginequick/minimal/qml.qrc
deleted file mode 100644
index 0ff3892d9..000000000
--- a/examples/webenginequick/minimal/qml.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- </qresource>
-</RCC>
-
diff --git a/examples/webenginequick/webenginequick.pro b/examples/webenginequick/webenginequick.pro
index edf4315a0..6a0a858d6 100644
--- a/examples/webenginequick/webenginequick.pro
+++ b/examples/webenginequick/webenginequick.pro
@@ -3,7 +3,6 @@ TEMPLATE=subdirs
SUBDIRS += \
customdialogs \
customtouchhandle \
- minimal \
quicknanobrowser \
webengineaction