Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

My QQuickRenderControl isn't calling the render function if root QQuickItem isn't “dirty”



  • I'm experimenting with the "RenderControl" project from Qt's Examples with the goal of knowing how fast would Qt's Quick Framework with a QQuickRenderControl would render an empty scene.

    The source can be found here

    For this, I've removed almost everything from the qml file and left a simple rectangle but I noticed that my WindowSingleThreaded::render() stopped being called altogether.

    I saw that introducing a simple SequentialAnimation to the root item made the WindowSingleThreaded::render() get called again every frame.

    Now I'm sure this would be somewhat ideal for all those cases where you don't want to re-render your scene if nothing has changed but in my case, I want to have full control over the rendering loop even if the qml scene isn't "dirty".

    I saw that maybe a qml Timer could be introduced to try to have the scene forcefully updated but even this doesn't sound like the ultimate solution as I want to avoid going to javascript and back every frame.

    Does anyone know how I can forcefully have WindowSingleThreaded::render() whether the QQuickWindow wants it or not.

    Thanks


Log in to reply