blob: c114ea935ff053ab4472ea49b19deedd7b3fa686 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "server.h"
#include <QtWebEngineQuick/qtwebenginequickglobal.h>
#include <QNetworkProxy>
#include <QQmlApplicationEngine>
#include <QTimer>
#include <QtGui/QGuiApplication>
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();
}
|