'vtkScalarBarActor' show error with vtkGenericOpenGLRenderWindow

I want to add vtkScalarBarActor in vtk widget under qt , but I have a problem. When using vtkGenericOpenGLRenderWindow, the displayed color bar has no color, and the label is normal. But if I switch vtkGenericOpenGLRenderWindow to vtkRenderWindow, everything is normal, but now I have to Use vtkGenericOpenGLRenderWindow, does anyone know why this is the case? Is it because vtkGenericOpenGLRenderWindow is any different from vtkRenderWindow?