19 QMainWindow(parent, Qt::WindowStaysOnTopHint)
22 this->setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);
24 widget->setParent(
this);
25 this->addAsDockWidget(widget,
true);
28 this->setGeometry(0, 600, 600, 400);
36 void SecondaryMainWindow::addAsDockWidget(QWidget* widget,
bool visible)
38 QDockWidget* dockWidget =
new QDockWidget(widget->windowTitle(),
this);
39 dockWidget->setObjectName(widget->objectName() +
"DockWidget");
40 dockWidget->setWidget(widget);
41 this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
42 dockWidget->setVisible(visible);