mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-12 16:20:25 +08:00
Implemented workarund for NonClientArea mouse event bug in Qt versions > 5.9.2.
This commit is contained in:
parent
c9645ef85b
commit
b44a7e75ca
@ -313,7 +313,18 @@ void CFloatingDockContainer::closeEvent(QCloseEvent *event)
|
|||||||
|
|
||||||
if (isClosable())
|
if (isClosable())
|
||||||
{
|
{
|
||||||
QWidget::closeEvent(event);
|
// In Qt version after 5.9.2 there seems to be a bug that causes the
|
||||||
|
// QWidget::event() function to not receive any NonClientArea mouse
|
||||||
|
// events anymore after a close/show cycle. The bug is reported here:
|
||||||
|
// https://bugreports.qt.io/browse/QTBUG-73295
|
||||||
|
// The following code is a workaround for Qt versions > 5.9.2 that seems
|
||||||
|
// to work
|
||||||
|
#if (QT_VERSION > 0x050902)
|
||||||
|
event->ignore();
|
||||||
|
this->hide();
|
||||||
|
#else
|
||||||
|
Super::closeEvent(event);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user