Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
i want to change my QOpenGl background Color after init.
All solutions with a similar problem pointed to this: https://www.opengl.org/resources/libraries/glut/spec3/node20.html
So i wonder if there is something Qt that does the same. update() does not work
Can you show how you are using QOpenGLWidget ?
I'd move the call to glClearColor just before calling glClear.
If you don't want to recalculate it each turn, add a dirty check.
Yeah now it works thank you a lot @SGaist
Just one thing. The 3D object changes the Color directly when i press on the light button. But the backgound only after i moved the object a bit.
But in both cases i call update(). Any ideas what makes the different to update() in the mouse move function??
Maybe the frameSwapped signal is what you are looking for.
On a side note, your usage of parentWidget is a bad idea. You are creating a tight coupling and preparing for a nightmare maintenance of your application.