QWidget* widget = new QWidget(this); QWindow* window= new QWindow(this); widget->layout()->addWidget(QWidget::createWindowContainer(window));