summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-03-17 08:45:13 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-22 12:48:35 +0000
commit37b04eeb90063b9845d4b6154fa3bc7e36ebdf0c (patch)
treefe262622904dc25c9fb3ca3238997f1a6d00f250 /examples
parentb28b1cb6eca4752afd11d94af7d47d8afe91c424 (diff)
Move widgets minimal example to manual tests
Task-number: QTBUG-108751 Change-Id: I6e237b04d1f6a19f64516cd45aabe4d28099abd5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 34ebe8be93ab10766d034e5a3943a12c8de3a58e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginewidgets/CMakeLists.txt1
-rw-r--r--examples/webenginewidgets/minimal/CMakeLists.txt36
-rw-r--r--examples/webenginewidgets/minimal/doc/images/minimal-example.pngbin89294 -> 0 bytes
-rw-r--r--examples/webenginewidgets/minimal/doc/src/minimal.qdoc55
-rw-r--r--examples/webenginewidgets/minimal/main.cpp28
-rw-r--r--examples/webenginewidgets/minimal/minimal.pro8
-rw-r--r--examples/webenginewidgets/webenginewidgets.pro1
7 files changed, 0 insertions, 129 deletions
diff --git a/examples/webenginewidgets/CMakeLists.txt b/examples/webenginewidgets/CMakeLists.txt
index c3d466558..0b5757e35 100644
--- a/examples/webenginewidgets/CMakeLists.txt
+++ b/examples/webenginewidgets/CMakeLists.txt
@@ -1,7 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-qt_internal_add_example(minimal)
qt_internal_add_example(contentmanipulation)
qt_internal_add_example(cookiebrowser)
qt_internal_add_example(notifications)
diff --git a/examples/webenginewidgets/minimal/CMakeLists.txt b/examples/webenginewidgets/minimal/CMakeLists.txt
deleted file mode 100644
index 68642c638..000000000
--- a/examples/webenginewidgets/minimal/CMakeLists.txt
+++ /dev/null
@@ -1,36 +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}/webenginewidgets/minimal-widgets")
-
-find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineWidgets)
-
-qt_add_executable(minimal-widgets
- main.cpp
-)
-
-set_target_properties(minimal-widgets PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-
-target_link_libraries(minimal-widgets PUBLIC
- Qt::Core
- Qt::Gui
- Qt::WebEngineWidgets
-)
-
-install(TARGETS minimal-widgets
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/webenginewidgets/minimal/doc/images/minimal-example.png b/examples/webenginewidgets/minimal/doc/images/minimal-example.png
deleted file mode 100644
index 18ac9b177..000000000
--- a/examples/webenginewidgets/minimal/doc/images/minimal-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
deleted file mode 100644
index 5fb5f8be3..000000000
--- a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \example webenginewidgets/minimal
- \title WebEngine Widgets Minimal Example
- \ingroup webengine-widgetexamples
- \brief Displays a web page using \QWE Widgets.
-
- \image minimal-example.png
-
- \e {WebEngine Widgets Minimal Example} demonstrates how to use
- \l{QWebEngineView} 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 The Code
-
- We first define a \c commandLineUrlArgument function that returns the URL to open.
- This is either the first positional argument given on the command line, or
- \c https://www.qt.io as a fallback.
-
- \quotefromfile webenginewidgets/minimal/main.cpp
- \skipto #include
-
- \printto int 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{QWebEngineProfile::cachePath} and
- \l{QWebEngineProfile::persistentStoragePath}).
-
- Next, we instantiate a QApplication and a QWebEngineView. The URL
- to load is taken from \c commandLineUrlArgument and
- loaded by calling \l QWebEngineView::setUrl. The view widget is
- given a reasonable default size, and shown.
- Finally, QApplication::exec() launches the main event loop.
-
- \printuntil }
-
- \section1 Requirements
-
- The example requires a working internet connection to render
- the \l{Qt Homepage}.
- An optional system proxy should be picked up automatically.
- However, for proxies that require a username or password,
- you need to connect to
- QWebEnginePage::proxyAuthenticationRequired.
-
- \l{Qt WebEngine Widgets} uses the \l{Qt Quick Scene Graph} to compose the
- page. Therefore, OpenGL support is required.
-*/
diff --git a/examples/webenginewidgets/minimal/main.cpp b/examples/webenginewidgets/minimal/main.cpp
deleted file mode 100644
index 86c04e721..000000000
--- a/examples/webenginewidgets/minimal/main.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QApplication>
-#include <QWebEngineView>
-
-QUrl commandLineUrlArgument()
-{
- const QStringList args = QCoreApplication::arguments();
- for (const QString &arg : args.mid(1)) {
- if (!arg.startsWith(QLatin1Char('-')))
- return QUrl::fromUserInput(arg);
- }
- return QUrl(QStringLiteral("https://www.qt.io"));
-}
-
-int main(int argc, char *argv[])
-{
- QCoreApplication::setOrganizationName("QtExamples");
- QApplication app(argc, argv);
-
- QWebEngineView view;
- view.setUrl(commandLineUrlArgument());
- view.resize(1024, 750);
- view.show();
-
- return app.exec();
-}
diff --git a/examples/webenginewidgets/minimal/minimal.pro b/examples/webenginewidgets/minimal/minimal.pro
deleted file mode 100644
index 849f4b9b6..000000000
--- a/examples/webenginewidgets/minimal/minimal.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-TEMPLATE = app
-
-QT += webenginewidgets
-
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal
-INSTALLS += target
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
index cfddfdaae..119f6e1b1 100644
--- a/examples/webenginewidgets/webenginewidgets.pro
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -3,7 +3,6 @@ QT_FOR_CONFIG += webenginecore webenginecore-private network-private
TEMPLATE=subdirs
SUBDIRS += \
- minimal \
contentmanipulation \
cookiebrowser \
notifications \