From aef55501bccd52f63a84228cb2ee201ec4f5c301 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 4 Jul 2022 13:31:25 +0200 Subject: tests: replace gtk-embedder.py with a gtk3 app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All linux CI machines have gtk3 installed. And Python GTK things are too complicate to setup. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I3c0d967f61aebea508784df79569b9d0064f66e2 Reviewed-by: Tor Arne Vestbø --- tests/manual/xembed/qt-client-widget/main.cpp | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/manual/xembed/qt-client-widget/main.cpp (limited to 'tests/manual/xembed/qt-client-widget/main.cpp') diff --git a/tests/manual/xembed/qt-client-widget/main.cpp b/tests/manual/xembed/qt-client-widget/main.cpp new file mode 100644 index 00000000000..59b1a76c6a0 --- /dev/null +++ b/tests/manual/xembed/qt-client-widget/main.cpp @@ -0,0 +1,32 @@ +// 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 +#include +#include + +#include "window.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QStringList args = app.arguments(); + + WId winId = 0; + if (args.count() > 1) { + bool ok; + winId = args[1].toUInt(&ok); + Q_ASSERT(ok); + } + + Window window; + window.show(); + + QWindow *foreign = QWindow::fromWinId(winId); + Q_ASSERT(foreign != 0); + + window.windowHandle()->setParent(foreign); + + return app.exec(); +} -- cgit v1.2.3