summaryrefslogtreecommitdiffstats
path: root/examples/network/http/main.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-18 09:01:51 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-18 09:01:51 +0100
commitc7934f2489e2eb9a539206bab35f335b1943c5bd (patch)
treea27d0ed6c001fe9432e2a0f28fb935acf9e4c65f /examples/network/http/main.cpp
parentf40593b11199fbef886bfcb6b210a214d8c3adf3 (diff)
parent08f9a1bd6ab9b1777ee5ba163d75e5c848c39eb4 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
Diffstat (limited to 'examples/network/http/main.cpp')
-rw-r--r--examples/network/http/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp
index 5857af265c..b4960008ec 100644
--- a/examples/network/http/main.cpp
+++ b/examples/network/http/main.cpp
@@ -39,6 +39,7 @@
****************************************************************************/
#include <QApplication>
+#include <QDesktopWidget>
#include <QDir>
#include "httpwindow.h"
@@ -47,8 +48,10 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
-
HttpWindow httpWin;
+ const QRect availableSize = QApplication::desktop()->availableGeometry(&httpWin);
+ httpWin.resize(availableSize.width() / 5, availableSize.height() / 5);
+ httpWin.move((availableSize.width() - httpWin.width()) / 2, (availableSize.height() - httpWin.height()) / 2);
httpWin.show();
return app.exec();