From b54dab7df2fbf25be1e7be34924f6f4f52313209 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Sat, 16 Jan 2021 15:00:44 +0100 Subject: [PATCH] Fixed the empty dock area example to test procramatic docking with empty dock area --- examples/emptydockarea/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/emptydockarea/mainwindow.cpp b/examples/emptydockarea/mainwindow.cpp index 4fbecc7..c8975a8 100644 --- a/examples/emptydockarea/mainwindow.cpp +++ b/examples/emptydockarea/mainwindow.cpp @@ -43,8 +43,8 @@ CMainWindow::CMainWindow(QWidget *parent) label->setAlignment(Qt::AlignCenter); CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget"); CentralDockWidget->setWidget(label); - auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget); CentralDockWidget->setFeature(ads::CDockWidget::NoTab, true); + auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget); // create other dock widgets QTableWidget* table = new QTableWidget(); @@ -55,7 +55,8 @@ CMainWindow::CMainWindow(QWidget *parent) TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->resize(250, 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()); table = new QTableWidget(); @@ -66,7 +67,8 @@ CMainWindow::CMainWindow(QWidget *parent) TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->resize(250, 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()); QTableWidget* propertiesTable = new QTableWidget();