Render parts of a QML scene to offscreen buffer (FBO)

  • Anyone know of a way to render parts of a QML scene (perhaps subtrees of the scene graph) to an offscreen buffer, like an FBO?

    Something similar to this:

    Specifically, my use case is that I want to render a component within the scene and all of its children to a separate buffer so that I can recomposite it manually.

    Performance is of little concern. That is, I don't mind if the UI is interrupted for a long time while the offscreen rendering occurs.

    After reading the scene graph documentation and API, it seems like I might have to implement a custom scene graph renderer or get the subtree from the component via its QQuickItem::updatePaintNode method and somehow render this subtree manually to an FBO. Just not sure what's the best way to go about this.

    Any advice would be appreciated!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.