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

"ShaderEffect: Property 'source' is not assigned a valid texture provider (std::nullptr_t)" when setting ColorOverlay's source to null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 5.11
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      macOS

      Description

      When switching a ColorOverlay's source between an item and null, the following warning in the title is printed. I would expect that there is no error, and the overlay simply does nothing.

      import QtQuick 2.7
      import QtQuick.Controls 2.3
      import QtGraphicalEffects 1.0
      
      ApplicationWindow {
          id: main
          visible: true
          width: 640
          height: 480
      
          Rectangle {
              id: rect
              color: "grey"
              width: 128
              height: 128
              anchors.centerIn: parent
          }
      
          MouseArea {
              id: mouseArea
              anchors.fill: rect
              hoverEnabled: true
          }
      
          ColorOverlay {
              id: hoveredEntityMarkerColorOverlay
              anchors.fill: rect
              source: mouseArea.containsMouse ? rect : null
              color: mouseArea.containsMouse ? "red" : "green"
          }
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            sletta Gunnar Sletta
            Reporter:
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes