mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-26 08:01:32 +08:00
Properly implemented flag DockAreaHasCloseButton
This commit is contained in:
parent
bed99eacc2
commit
2c7764ecf7
@ -308,8 +308,8 @@ CMainWindow::CMainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
// Uncomment the following line to have the old style where the dock
|
// Uncomment the following line to have the old style where the dock
|
||||||
// area close button closes the active tab
|
// area close button closes the active tab
|
||||||
//d->DockManager->setConfigFlags({
|
//CDockManager::setConfigFlags({CDockManager::DockAreaHasCloseButton
|
||||||
// CDockManager::DockAreaHasCloseButton | CDockManager::DockAreaCloseButtonClosesTab});
|
// | CDockManager::DockAreaCloseButtonClosesTab});
|
||||||
connect(d->PerspectiveComboBox, SIGNAL(activated(const QString&)),
|
connect(d->PerspectiveComboBox, SIGNAL(activated(const QString&)),
|
||||||
d->DockManager, SLOT(openPerspective(const QString&)));
|
d->DockManager, SLOT(openPerspective(const QString&)));
|
||||||
|
|
||||||
|
@ -181,7 +181,10 @@ void DockAreaTitleBarPrivate::createButtons()
|
|||||||
#endif
|
#endif
|
||||||
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||||
CloseButton->setIconSize(QSize(16, 16));
|
CloseButton->setIconSize(QSize(16, 16));
|
||||||
|
if (testConfigFlag(CDockManager::DockAreaHasCloseButton))
|
||||||
|
{
|
||||||
TopLayout->addWidget(CloseButton, 0);
|
TopLayout->addWidget(CloseButton, 0);
|
||||||
|
}
|
||||||
_this->connect(CloseButton, SIGNAL(clicked()), SLOT(onCloseButtonClicked()));
|
_this->connect(CloseButton, SIGNAL(clicked()), SLOT(onCloseButtonClicked()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user