diff options
Diffstat (limited to 'src/quickwidgets/qquickwidget.cpp')
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index c4100551d0..b472664068 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1218,4 +1218,23 @@ void QQuickWidget::setClearColor(const QColor &color) d->offscreenWindow->setColor(color); } +/*! + \since 5.5 + + Returns the offscreen QQuickWindow which is used by this widget to drive + the Qt Quick rendering. This is useful if you want to use QQuickWindow + APIs that are not currently exposed by QQuickWidget, for instance + connecting to the QQuickWindow::beforeRendering() signal in order + to draw native OpenGL content below Qt Quick's own rendering. + + \warning Use the return value of this function with caution. In + particular, do not ever attempt to show the QQuickWindow, and be + very careful when using other QWindow-only APIs. +*/ +QQuickWindow *QQuickWidget::quickWindow() const +{ + Q_D(const QQuickWidget); + return d->offscreenWindow; +} + QT_END_NAMESPACE |