Fixxed issue #294 - Tab refresh problem with a QGLWidget

This commit is contained in:
Uwe Kindler 2021-06-17 20:32:45 +02:00
parent edc89555bc
commit 511132ee4f
2 changed files with 26 additions and 0 deletions

View File

@ -1030,6 +1030,21 @@ void CDockAreaWidget::onDockWidgetFeaturesChanged()
}
#ifdef Q_OS_WIN
//============================================================================
bool CDockAreaWidget::event(QEvent *e)
{
switch (e->type())
{
case QEvent::PlatformSurface: return true;
default:
break;
}
return Super::event(e);
}
#endif
} // namespace ads
//---------------------------------------------------------------------------

View File

@ -77,6 +77,17 @@ private Q_SLOTS:
void reorderDockWidget(int fromIndex, int toIndex);
protected:
#ifdef Q_OS_WIN
/**
* Reimplements QWidget::event to handle QEvent::PlatformSurface
* This is here to fix issue #294 Tab refresh problem with a QGLWidget
* that exists since Qt version 5.12.7. So this function is here to
* work around a Qt issue.
*/
virtual bool event(QEvent *event) override;
#endif
/**
* Inserts a dock widget into dock area.
* All dockwidgets in the dock area tabified in a stacked layout with tabs.