Fixed the empty dock area example to test procramatic docking with empty dock area

This commit is contained in:
Uwe Kindler 2021-01-16 15:00:44 +01:00
parent e03674fd4b
commit b54dab7df2

View File

@ -43,8 +43,8 @@ CMainWindow::CMainWindow(QWidget *parent)
label->setAlignment(Qt::AlignCenter); label->setAlignment(Qt::AlignCenter);
CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget"); CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget");
CentralDockWidget->setWidget(label); CentralDockWidget->setWidget(label);
auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget);
CentralDockWidget->setFeature(ads::CDockWidget::NoTab, true); CentralDockWidget->setFeature(ads::CDockWidget::NoTab, true);
auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget);
// create other dock widgets // create other dock widgets
QTableWidget* table = new QTableWidget(); QTableWidget* table = new QTableWidget();
@ -55,7 +55,8 @@ CMainWindow::CMainWindow(QWidget *parent)
TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget);
TableDockWidget->resize(250, 150); TableDockWidget->resize(250, 150);
TableDockWidget->setMinimumSize(200,150); TableDockWidget->setMinimumSize(200,150);
auto TableArea = DockManager->addDockWidget(DockWidgetArea::LeftDockWidgetArea, TableDockWidget); DockManager->addDockWidgetTabToArea(TableDockWidget, CentralDockArea);
//auto TableArea = DockManager->addDockWidget(DockWidgetArea::LeftDockWidgetArea, TableDockWidget);
ui->menuView->addAction(TableDockWidget->toggleViewAction()); ui->menuView->addAction(TableDockWidget->toggleViewAction());
table = new QTableWidget(); table = new QTableWidget();
@ -66,7 +67,8 @@ CMainWindow::CMainWindow(QWidget *parent)
TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget);
TableDockWidget->resize(250, 150); TableDockWidget->resize(250, 150);
TableDockWidget->setMinimumSize(200,150); TableDockWidget->setMinimumSize(200,150);
DockManager->addDockWidget(DockWidgetArea::BottomDockWidgetArea, TableDockWidget, TableArea); auto TableArea = DockManager->addDockWidget(DockWidgetArea::LeftDockWidgetArea, TableDockWidget);
//DockManager->addDockWidget(DockWidgetArea::BottomDockWidgetArea, TableDockWidget, TableArea);
ui->menuView->addAction(TableDockWidget->toggleViewAction()); ui->menuView->addAction(TableDockWidget->toggleViewAction());
QTableWidget* propertiesTable = new QTableWidget(); QTableWidget* propertiesTable = new QTableWidget();