Offscreen rendering in QtQuick application

Hello,
I have a problem adapting an application under linux to qtquick with vtk offscreen rendering to generate graphics in png format.
The rendering should not work visually via a QVtk element, but completely detached from qt in the background. I have already tried a lot, but I am completely stumped at the moment. Unfortunately I can’t find a suitable example. My current status is that I was able to fix all crashes, etc. but the image only consists of a very grayish noise. I would be happy if someone could take care of my problem. I am not submitting existing code for the time being, but would like to create a solved example with which I can proceed. Perhaps someone already has a suitable example?