Fixed FloatingDockContainer closeEvent to properly support QAxWidgets

This commit is contained in:
Uwe Kindler
2020-01-10 08:54:44 +01:00
parent 1de42a9766
commit 616e50c3f5
3 changed files with 18 additions and 15 deletions

View File

@@ -352,6 +352,7 @@ void CFloatingDockContainer::closeEvent(QCloseEvent *event)
{
ADS_PRINT("CFloatingDockContainer closeEvent");
d->setState(DraggingInactive);
event->ignore();
if (isClosable())
{
@@ -371,20 +372,7 @@ void CFloatingDockContainer::closeEvent(QCloseEvent *event)
// Starting from Qt version 5.12.2 this seems to work again. But
// now the QEvent::NonClientAreaMouseButtonPress function returns always
// Qt::RightButton even if the left button was pressed
#ifndef Q_OS_LINUX
#if (QT_VERSION > QT_VERSION_CHECK(5, 9, 2) && QT_VERSION < QT_VERSION_CHECK(5, 12, 2))
event->ignore();
this->hide();
#else
Super::closeEvent(event);
#endif
#else // Q_OS_LINUX
Super::closeEvent(event);
#endif
}
else
{
event->ignore();
}
}