summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 2b703e8ff2..ac32c32e12 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -96,7 +96,9 @@ public:
}
QRectF closestAcceptableGeometry(const QRectF &rect) const override;
+#if QT_CONFIG(opengl)
QOpenGLContext *shareContext() const override;
+#endif
};
QRectF QWidgetWindowPrivate::closestAcceptableGeometry(const QRectF &rect) const
@@ -128,12 +130,14 @@ QRectF QWidgetWindowPrivate::closestAcceptableGeometry(const QRectF &rect) const
return result;
}
+#if QT_CONFIG(opengl)
QOpenGLContext *QWidgetWindowPrivate::shareContext() const
{
Q_Q(const QWidgetWindow);
const QWidgetPrivate *widgetPrivate = QWidgetPrivate::get(q->widget());
return widgetPrivate->shareContext();
}
+#endif // opengl
QWidgetWindow::QWidgetWindow(QWidget *widget)
: QWindow(*new QWidgetWindowPrivate(), 0)