File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,18 @@ namespace QWK {
105105
106106 // Since a QExposeEvent will be sent immediately after the QResizeEvent, we can
107107 // simply ignore it.
108+ #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
109+ struct ExposeEvent : public QExposeEvent {
110+ inline const QRegion &getRegion () const { return m_region; }
111+ };
112+ auto ee = static_cast <ExposeEvent *>(event);
113+ bool exposeRegionValid = !ee->getRegion ().isNull ();
114+ #else
108115 auto ee = static_cast <QExposeEvent *>(event);
116+ bool exposeRegionValid = !ee->region ().isNull ();
117+ #endif
109118 auto window = widget->windowHandle ();
110- if (window->isExposed () && isNormalWindow () && !ee-> region (). isNull () ) {
119+ if (window->isExposed () && isNormalWindow () && exposeRegionValid ) {
111120 forwardEventToWindowAndDraw (window, event);
112121 return true ;
113122 }
You can’t perform that action at this time.
0 commit comments