Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
None
-
5.0.0
-
None
-
Any QtQuick 2.0 (=OpenGL)
Description
There is no way to use glClear with a custom background colour from pure-QML.
A common pattern for a solid background colour is a Rectangle filling the root. But this is less efficient than setting the desired colour as the glClear value.
There should be a QML API or implementation for doing this, that maps a user set QML property to a QSGEngine::setClearColor.
If a background root-filling borderless rectangle with solid colour could be detected and translated to this, that might be the best option.
Alternatively there could be a method on the Qt object, or a global root colour property in the runtime.