Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19799

No way to set glClear/QSGEngine::setClearColor from QML in QtQuick2.0

    XMLWordPrintable

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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            anbaldwi Andrew Baldwin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes