diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-09-23 13:32:00 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-28 06:19:04 +0000 |
commit | 549c12ae5352741a450d8948671d8ff0f332534e (patch) | |
tree | 6a021745fefa14eddb8eeec055bec8fc452d523a /examples | |
parent | 9aa808912ba9ceea7641b8a9eaeebd108e8ad91b (diff) |
Do not require widgets for quick examples
We needed widgets to get qqc1 styling, since
we now use only qqc2 drop that requirement.
Fixes: QTBUG-96771
Task-number: QTBUG-95367
Change-Id: I7338cd04885069169fef1c4bca17e0777b11de8c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 7405ce9412e6b0bc70b2051734668c8ecca4ceb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webenginequick/customdialogs/CMakeLists.txt | 1 | ||||
-rw-r--r-- | examples/webenginequick/customdialogs/main.cpp | 10 | ||||
-rw-r--r-- | examples/webenginequick/quicknanobrowser/main.cpp | 8 |
3 files changed, 2 insertions, 17 deletions
diff --git a/examples/webenginequick/customdialogs/CMakeLists.txt b/examples/webenginequick/customdialogs/CMakeLists.txt index ce37f3725..bd1810931 100644 --- a/examples/webenginequick/customdialogs/CMakeLists.txt +++ b/examples/webenginequick/customdialogs/CMakeLists.txt @@ -16,7 +16,6 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginequick/customdialogs") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS WebEngineQuick) -find_package(Qt6 OPTIONAL_COMPONENTS Widgets) qt_add_executable(customdialogs main.cpp diff --git a/examples/webenginequick/customdialogs/main.cpp b/examples/webenginequick/customdialogs/main.cpp index 463da44f6..6ed5771f1 100644 --- a/examples/webenginequick/customdialogs/main.cpp +++ b/examples/webenginequick/customdialogs/main.cpp @@ -53,22 +53,14 @@ #include <QNetworkProxy> #include <QQmlApplicationEngine> #include <QTimer> - -#ifndef QT_NO_WIDGETS -#include <QtWidgets/QApplication> -// QApplication is required to get native styling with QtQuickControls -typedef QApplication Application; -#else #include <QtGui/QGuiApplication> -typedef QGuiApplication Application; -#endif int main(int argc, char *argv[]) { QCoreApplication::setOrganizationName("QtExamples"); QtWebEngineQuick::initialize(); - Application app(argc, argv); + QGuiApplication app(argc, argv); QQmlApplicationEngine engine; Server *server = new Server(&engine); diff --git a/examples/webenginequick/quicknanobrowser/main.cpp b/examples/webenginequick/quicknanobrowser/main.cpp index 859856d92..f21b0362c 100644 --- a/examples/webenginequick/quicknanobrowser/main.cpp +++ b/examples/webenginequick/quicknanobrowser/main.cpp @@ -50,13 +50,7 @@ #include "utils.h" -#ifndef QT_NO_WIDGETS -#include <QtWidgets/QApplication> -typedef QApplication Application; -#else #include <QtGui/QGuiApplication> -typedef QGuiApplication Application; -#endif #include <QtQml/QQmlApplicationEngine> #include <QtQml/QQmlContext> #include <QtWebEngineQuick/qtwebenginequickglobal.h> @@ -81,7 +75,7 @@ int main(int argc, char **argv) QCoreApplication::setOrganizationName("QtExamples"); QtWebEngineQuick::initialize(); - Application app(argc, argv); + QGuiApplication app(argc, argv); QQmlApplicationEngine appEngine; Utils utils; |