From b71403faeedf2955e3af541f9e140305af9ba0a8 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 20 Mar 2023 08:46:13 +0100 Subject: Move custom dialogs example to manual tests This example shows how to use dialogs, however documentation already provides snippets for that added in 3cbe59e29a. The only missing one was tooltip, therefore add missing snippet and move example to manual tests. Task-number: QTBUG-108751 Change-Id: I84eda805455fb0276046ed1089389d605a8af672 Reviewed-by: Michal Klocek (cherry picked from commit 6bf30525ee49d270dae6a6440bc607513f21237c) Reviewed-by: Qt Cherry-pick Bot --- tests/manual/examples/quick/customdialogs/main.cpp | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/manual/examples/quick/customdialogs/main.cpp (limited to 'tests/manual/examples/quick/customdialogs/main.cpp') diff --git a/tests/manual/examples/quick/customdialogs/main.cpp b/tests/manual/examples/quick/customdialogs/main.cpp new file mode 100644 index 000000000..c114ea935 --- /dev/null +++ b/tests/manual/examples/quick/customdialogs/main.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#include "server.h" +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication::setOrganizationName("QtExamples"); + QtWebEngineQuick::initialize(); + + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + Server *server = new Server(&engine); + + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); + QTimer::singleShot(0, server, &Server::run); + + QNetworkProxy proxy; + proxy.setType(QNetworkProxy::HttpProxy); + proxy.setHostName("localhost"); + proxy.setPort(5555); + QNetworkProxy::setApplicationProxy(proxy); + + return app.exec(); +} + -- cgit v1.2.1