Background color always black

Hi, I am using a QQuickVtkRenderWindow inside a bigger software with a smaller QQuickVtkRenderItem. I changed the background color of the QQuickVtkRenderItem no problem… but the QQuickVtkRenderWindow is still black… and is the whole software window. To just change the backgound-color of my application window inside QML code doesn’t work.
Does anyone have any idea how to fix that?

Thanks for your help

Hi, Julien,

I change the background of my scene via renderer (vtkRenderer):

    // add a nice sky-like background
    _rendererMainScene->GradientBackgroundOn();
    _rendererMainScene->SetBackground(0.9, 0.9, 1);
    _rendererMainScene->SetBackground2(0.5, 0.5, 1);
    _rendererMainScene->SetLayer( 0 ); //only the renderer of layer 0 have background.

regards,

Paulo

But the renderer take the size of my QQuickVTKRenderItem and not of my QQuickVtkRenderWindow

@sankhesh

Well, that’s a different question.

1 Like