Added new CDockWidget flag CDockWidget::NoTab to hide the tab from the dock area title bar

This commit is contained in:
Uwe Kindler
2021-01-09 19:02:25 +01:00
parent c8fe4c46dd
commit 8a27a5596b
3 changed files with 7 additions and 5 deletions

View File

@@ -49,12 +49,13 @@ CMainWindow::CMainWindow(QWidget *parent)
DockManager = new CDockManager(this);
// Set central widget
QPlainTextEdit* w = new QPlainTextEdit();
w->setPlaceholderText("This is the central editor. Enter your text here.");
//QPlainTextEdit* w = new QPlainTextEdit();
//w->setPlaceholderText("This is the central editor. Enter your text here.");
CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget");
CentralDockWidget->setWidget(w);
//CentralDockWidget->setWidget(w);
auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget);
CentralDockArea->setAllowedAreas(DockWidgetArea::OuterDockAreas);
CentralDockWidget->setFeature(ads::CDockWidget::NoTab, true);
//CentralDockArea->setAllowedAreas(DockWidgetArea::OuterDockAreas);
// create other dock widgets
QTreeView* fileTree = new QTreeView();