diff options
Diffstat (limited to 'examples/network')
-rw-r--r-- | examples/network/http/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp index b7d254ff22..f126c7846a 100644 --- a/examples/network/http/main.cpp +++ b/examples/network/http/main.cpp @@ -49,8 +49,8 @@ ****************************************************************************/ #include <QApplication> -#include <QDesktopWidget> #include <QDir> +#include <QScreen> #include "httpwindow.h" @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); HttpWindow httpWin; - const QRect availableSize = QApplication::desktop()->availableGeometry(&httpWin); + const QRect availableSize = httpWin.screen()->availableGeometry(); httpWin.resize(availableSize.width() / 5, availableSize.height() / 5); httpWin.move((availableSize.width() - httpWin.width()) / 2, (availableSize.height() - httpWin.height()) / 2); |