Skip to content

Commit 511132e

Browse files
Fixxed issue #294 - Tab refresh problem with a QGLWidget
1 parent edc8955 commit 511132e

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/DockAreaWidget.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,21 @@ void CDockAreaWidget::onDockWidgetFeaturesChanged()
10301030
}
10311031

10321032

1033+
#ifdef Q_OS_WIN
1034+
//============================================================================
1035+
bool CDockAreaWidget::event(QEvent *e)
1036+
{
1037+
switch (e->type())
1038+
{
1039+
case QEvent::PlatformSurface: return true;
1040+
default:
1041+
break;
1042+
}
1043+
1044+
return Super::event(e);
1045+
}
1046+
#endif
1047+
10331048
} // namespace ads
10341049

10351050
//---------------------------------------------------------------------------

src/DockAreaWidget.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ private Q_SLOTS:
7777
void reorderDockWidget(int fromIndex, int toIndex);
7878

7979
protected:
80+
81+
#ifdef Q_OS_WIN
82+
/**
83+
* Reimplements QWidget::event to handle QEvent::PlatformSurface
84+
* This is here to fix issue #294 Tab refresh problem with a QGLWidget
85+
* that exists since Qt version 5.12.7. So this function is here to
86+
* work around a Qt issue.
87+
*/
88+
virtual bool event(QEvent *event) override;
89+
#endif
90+
8091
/**
8192
* Inserts a dock widget into dock area.
8293
* All dockwidgets in the dock area tabified in a stacked layout with tabs.

0 commit comments

Comments
 (0)