Skip to content

Commit

Permalink
Fixxed issue #294 - Tab refresh problem with a QGLWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
githubuser0xFFFF committed Jun 17, 2021
1 parent edc8955 commit 511132e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/DockAreaWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

//---------------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions src/DockAreaWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 511132e

Please sign in to comment.