diff options
Diffstat (limited to 'examples/qpa/windows/main.cpp')
-rw-r--r-- | examples/qpa/windows/main.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/examples/qpa/windows/main.cpp b/examples/qpa/windows/main.cpp deleted file mode 100644 index b2ce40c439..0000000000 --- a/examples/qpa/windows/main.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include <QGuiApplication> -#include <QScreen> -#include <QRect> -#include <QSharedPointer> - -#include "window.h" - -int main(int argc, char **argv) -{ - typedef QSharedPointer<QWindow> WindowPtr; - - QGuiApplication app(argc, argv); - - Window a; - a.setFramePosition(QPoint(10, 10)); - a.setTitle(QStringLiteral("Window A")); - a.setObjectName(a.title()); - a.setVisible(true); - - Window b; - b.setFramePosition(QPoint(100, 100)); - b.setTitle(QStringLiteral("Window B")); - b.setObjectName(b.title()); - b.setVisible(true); - - Window child(&b); - child.setObjectName(QStringLiteral("ChildOfB")); - child.setVisible(true); - - // create one window on each additional screen as well - - QList<WindowPtr> windows; - const QList<QScreen *> screens = app.screens(); - for (QScreen *screen : screens) { - if (screen == app.primaryScreen()) - continue; - WindowPtr window(new Window(screen)); - QRect geometry = window->geometry(); - geometry.moveCenter(screen->availableGeometry().center()); - window->setGeometry(geometry); - window->setVisible(true); - window->setTitle(screen->name()); - window->setObjectName(window->title()); - windows.push_back(window); - } - return app.exec(); -} |