QML get the winId of a loaded qml window
问题 I would like to get the winId of a qml window. I have the following files. main.qml : import QtQuick 2.5 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 Window { id: myMainWindow title: "MyMainWindow" width: 200 height: 200; visible: true Component.onCompleted: { x = 40 y = 40 } } and my main.cpp : #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QWindow> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine;