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

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.11
    • None
    • macOS
    • 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

            qt.team.graphics.and.multimedia Qt Graphics Team
            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