Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QWindow>
- #include <QWidget>
- #include <QVBoxLayout>
- // QWidget *widget -- as returned from suil_get_widget().
- //
- QWidget *central_widget = new QWidget(this);
- QWindow *window = QWindow::fromWinId(widget->windId());
- QWidget *container = QWidget::createWindowContainer(window, central_widget);
- QVBoxLayout *layout = new QVBoxLayout();
- layout->setMargin(0);
- layout->setSpacing(0);
- layout->addWidget(container);
- central_widget->setLayout(layout);
- setCentralWidget(central_widget);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement