cef9cbdd52
Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Id45bcfb92eb24c4455cf50497e28312eb87e0f9a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
30 lines
607 B
C++
30 lines
607 B
C++
// Copyright (C) 2017 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
#include "rasterwindow.h"
|
|
#include <QDebug>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
QGuiApplication app(argc, argv);
|
|
|
|
QStringList args = app.arguments();
|
|
|
|
WId winId = 0;
|
|
if (args.count() > 1) {
|
|
bool ok;
|
|
winId = args[1].toUInt(&ok);
|
|
Q_ASSERT(ok);
|
|
}
|
|
|
|
RasterWindow window;
|
|
|
|
QWindow *foreign = QWindow::fromWinId(winId);
|
|
Q_ASSERT(foreign != 0);
|
|
|
|
window.setParent(foreign);
|
|
window.show();
|
|
|
|
return app.exec();
|
|
}
|