From e0f6f3013ffa1b64cda423814d30fa9a074d1f6b Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Thu, 3 Sep 2020 15:23:05 +0200 Subject: [PATCH] Updated centralwidget example --- examples/centralwidget/mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/centralwidget/mainwindow.cpp b/examples/centralwidget/mainwindow.cpp index 943857b..902295b 100644 --- a/examples/centralwidget/mainwindow.cpp +++ b/examples/centralwidget/mainwindow.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "DockAreaWidget.h" #include "DockAreaTitleBar.h" @@ -31,12 +32,15 @@ CMainWindow::CMainWindow(QWidget *parent) ui->setupUi(this); CDockManager::setConfigFlag(CDockManager::OpaqueSplitterResize, true); CDockManager::setConfigFlag(CDockManager::XmlCompressionEnabled, false); + CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true); DockManager = new CDockManager(this); // Set central widget - QCalendarWidget* calendar = new QCalendarWidget(); + QPlainTextEdit* w = new QPlainTextEdit(); + w->setPlaceholderText("This is the central editor. Enter your text here."); + //w->setStyleSheet("border: none"); CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget"); - CentralDockWidget->setWidget(calendar); + CentralDockWidget->setWidget(w); auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget); CentralDockArea->setAllowedAreas(DockWidgetArea::OuterDockAreas);