mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +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,15 +379,25 @@ namespace BlackGui
|
||||
if (this->isFloating())
|
||||
{
|
||||
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);
|
||||
QTimer::singleShot(500, this, [ = ]
|
||||
{
|
||||
if (myself) { myself->close(); }
|
||||
// if (myself) { myself->close(); }
|
||||
});
|
||||
**/
|
||||
|
||||
event->setAccepted(false); // refuse -> do not close
|
||||
return;
|
||||
}
|
||||
QDockWidget::closeEvent(event);
|
||||
else
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
void CDockWidget::paintEvent(QPaintEvent *event)
|
||||
|
||||
Reference in New Issue
Block a user