1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-16 02:14:45 +08:00

Merge pull request from duerr-ndt/disable_internal_stylesheet

Allow disabling of internal stylesheet.
This commit is contained in:
Nick D'Ademo 2019-08-25 16:06:19 +08:00 committed by GitHub
commit 0405225f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -396,7 +396,7 @@ void DockManagerPrivate::addActionToMenu(QAction* Action, QMenu* Menu, bool Inse
//============================================================================ //============================================================================
CDockManager::CDockManager(QWidget *parent) : CDockManager::CDockManager(QWidget *parent, bool useInternalStyleSheet) :
CDockContainerWidget(this, parent), CDockContainerWidget(this, parent),
d(new DockManagerPrivate(this)) d(new DockManagerPrivate(this))
{ {
@ -411,7 +411,10 @@ CDockManager::CDockManager(QWidget *parent) :
d->DockAreaOverlay = new CDockOverlay(this, CDockOverlay::ModeDockAreaOverlay); d->DockAreaOverlay = new CDockOverlay(this, CDockOverlay::ModeDockAreaOverlay);
d->ContainerOverlay = new CDockOverlay(this, CDockOverlay::ModeContainerOverlay); d->ContainerOverlay = new CDockOverlay(this, CDockOverlay::ModeContainerOverlay);
d->Containers.append(this); d->Containers.append(this);
d->loadStylesheet(); if (useInternalStyleSheet)
{
d->loadStylesheet();
}
} }
//============================================================================ //============================================================================

View File

@ -130,10 +130,12 @@ public:
* Default Constructor. * Default Constructor.
* If the given parent is a QMainWindow, the dock manager sets itself as the * If the given parent is a QMainWindow, the dock manager sets itself as the
* central widget. * central widget.
* Loading of the internal stylesheet can be skipped by setting
* useInternalStyleSheet to false.
* Before you create any dock widgets, you should properly setup the * Before you create any dock widgets, you should properly setup the
* configuration flags via setConfigFlags() * configuration flags via setConfigFlags()
*/ */
CDockManager(QWidget* parent = 0); CDockManager(QWidget* parent = 0, bool useInternalStyleSheet = true);
/** /**
* Virtual Destructor * Virtual Destructor