When I use Qt Widget to build GUI, I can add a QWidget(sub window) in a QMainWindow(main window):
auto* wrapper = QWidget::createWindowContainer(m_window, this);
ui->horizontalLayout->addWidget(wrapper);
ui->centralWidget->setLayout(ui->horizontalLayout);
My application need the winId
of a sub window. Now I am trying to using QML to build GUI.
ApplicationWindow {
id: window
width: 800
height: 600
visible: true
menuBar: MenuBar {
}
}
Is there any way to add a window
(can invoke winId()) to the ApplicationWindow
?
I tried to add Window
in QML while two separate windows will appear, what I want is to have only one window, with sub window
inside the main window
.