I have a WindowID where I want to embed a QMainWindow
.
Briefly summarized:
I'm finding the equivalent of gtk.gdk.window_foreign_new()
.
My not working Qt5.2 code is:
WId nonqt_window_id = WId(0x7A00516);
QWindow* nonqt_parent_window = QWindow::fromWinId(nonqt_window_id);
QWidget* parent_widget = QWidget::createWindowContainer(nonqt_parent_window);
this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint);
this->setParent(nonqt_parent_window);
Notes
- this code has been written into the constructor of the
QMainWindow
- and I got the desired parent window into
nonqt_parent_window
variable