mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Floating dock widget close issue with Qt 5.14.1
see https://discordapp.com/channels/539048679160676382/539846348275449887/691667651285483564
This commit is contained in:
committed by
Mat Sutcliffe
parent
76e42cc16e
commit
8c2d2b0667
@@ -379,16 +379,26 @@ namespace BlackGui
|
|||||||
if (this->isFloating())
|
if (this->isFloating())
|
||||||
{
|
{
|
||||||
this->toggleFloating();
|
this->toggleFloating();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* since update to Qt 5.14.1 this kills the window
|
||||||
|
* https://discordapp.com/channels/539048679160676382/539846348275449887/691667651285483564
|
||||||
|
* \todo code can be removed AFTER 8-2020
|
||||||
|
|
||||||
QPointer<CDockWidget> myself(this);
|
QPointer<CDockWidget> myself(this);
|
||||||
QTimer::singleShot(500, this, [ = ]
|
QTimer::singleShot(500, this, [ = ]
|
||||||
{
|
{
|
||||||
if (myself) { myself->close(); }
|
// if (myself) { myself->close(); }
|
||||||
});
|
});
|
||||||
|
**/
|
||||||
|
|
||||||
event->setAccepted(false); // refuse -> do not close
|
event->setAccepted(false); // refuse -> do not close
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
QDockWidget::closeEvent(event);
|
QDockWidget::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CDockWidget::paintEvent(QPaintEvent *event)
|
void CDockWidget::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user