File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -779,6 +779,9 @@ CMainWindow::CMainWindow(QWidget *parent) :
779779 // uncomment if you would like to close tabs with the middle mouse button, web browser style
780780 // CDockManager::setConfigFlag(CDockManager::MiddleMouseButtonClosesTab, true);
781781
782+ // uncomment if you would like to avoid using the built-in QSS stylesheet
783+ // CDockManager::setConfigFlag(CDockManager::DisableStylesheet, true);
784+
782785 // Now create the dock manager and its content
783786 d->DockManager = new CDockManager (this );
784787 d->DockManager ->setDockWidgetToolBarStyle (Qt::ToolButtonIconOnly, ads::CDockWidget::StateFloating);
Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ DockManagerPrivate::DockManagerPrivate(CDockManager* _public) :
203203// ============================================================================
204204void DockManagerPrivate::loadStylesheet ()
205205{
206+ if (CDockManager::testConfigFlag (CDockManager::DisableStylesheet))
207+ {
208+ return ;
209+ }
206210 initResource ();
207211 QString Result;
208212 QString FileName = " :ads/stylesheets/" ;
Original file line number Diff line number Diff line change @@ -64,8 +64,13 @@ struct AutoHideTabPrivate;
6464 * of the docking system. The dock manager uses an internal stylesheet to
6565 * style its components like splitters, tabs and buttons. If you want to
6666 * disable this stylesheet because your application uses its own,
67- * just call the function for settings the stylesheet with an empty
68- * string.
67+ * you can either set the DisableStylesheet config flag before creating
68+ * the dock manager:
69+ * \code
70+ * CDockManager::setConfigFlag(CDockManager::DisableStylesheet, true);
71+ * \endcode
72+ * Or call the function for settings the stylesheet with an empty string
73+ * after creating the dock manager:
6974 * \code
7075 * DockManager->setStyleSheet("");
7176 * \endcode
@@ -218,6 +223,7 @@ public Q_SLOTS:
218223 DoubleClickUndocksWidget = 0x10000000 , // !< If the flag is set, a double click on a tab undocks the widget
219224 TabsAtBottom = 0x20000000 , // !< If the flag is set, tabs will be shown at the bottom instead of in the title bar.
220225 UseNativeWindows = 0x40000000 , // !< If the flag is set, windows for the dock and area widgets will be native.
226+ DisableStylesheet = 0x80000000 , // !< If the flag is set, the dock manager will not apply the default stylesheet
221227
222228
223229 DefaultDockAreaButtons = DockAreaHasCloseButton
You can’t perform that action at this time.
0 commit comments