[Development] QtQuick 2 offscreen rendering
andre.bergner.0 at googlemail.com
Tue Mar 18 10:12:35 CET 2014
for a project we use QML/QtQuick2 to render two separate offscreen views
for an application. We are currently still on Qt 5.1 and use a somehow
hacky solution to accomplish that goal, which is we create a QWindow and
set it immediately after its creation to hidden. We add two QQuickViews as
children, set their renderTargets to a frame buffer object, and grab its
content in the QQuickView::afterRendering step. This works so far for Mac
and Windows. The reason for this hack is that without adding the
QQuickViews to the hidden QWindow parent they won't receive any update
events and nothing will be drawn. On Windows the parent QWindow is
sometimes visible for a split second, which is not nice.
We now are facing the problem that this hack does not work anymore on
windows when we update to Qt 5.2. Besides from that this solution is not
So what is the "official" way to render a QQuickView scene to an offscreen
target while keeping it "alive"?
I remember talking to somebody at the last Qt dev days in Berlin. He was
suggesting some solution that should make this possible with Qt 5.2.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development