diff options
Diffstat (limited to 'examples/network/http/main.cpp')
-rw-r--r-- | examples/network/http/main.cpp | 5 |
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(); |