Thanks everyone for replying. Found another post: Vtk9.x Cannot used in QQuickFramebufferObject::Renderer *createRenderer() but vtk8.x can do . - #13 by NewPony
I tried with the code change and the removal of vtkRenderWindow->SetOffScreenRendering(true);
ends up fixing my issue.