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

Regression: DropShadow has gone crazy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.4.0 RC
    • 5.4.0 Alpha
    • None
    • Ubuntu 14.04
    • 64e2fa80015fb7d9e53cc66357870d4ea11f3590

      Steps to reproduce:

      Click on the square, it will disappear. Hover over the area it occupied and back out again, then click anywhere to make the square appear again. Now it will always render either grey or red, depending on how you moved the mouse before showing it.

      This code works in 5.3.2:

      import QtQuick 2.2
      import QtQuick.Controls 1.2
      import QtGraphicalEffects 1.0
      
      ApplicationWindow {
          visible: true
          width: 200
          height: 200
      
          Rectangle {
              anchors.fill: parent
              color: "white"
          }
      
          property bool b: false
      
          onBChanged: print(b)
      
          readonly property real margins: 40
      
          MouseArea {
              id: control
              anchors.fill: parent
              hoverEnabled: true
              onClicked: style.visible = !style.visible
              onPositionChanged: b = mouseX > margins && mouseY > margins && mouseX < width - margins && mouseY < height - margins
          }
      
          Item {
              id: style
              anchors.fill: control
              anchors.margins: margins
              Rectangle {
                  id: rect
                  anchors.fill: parent
                  visible: false
                  color: b ? "red" : Qt.rgba(0.6, 0.6, 0.6, 0.66)
              }
              DropShadow {
                  id: dropShadow
                  anchors.fill: rect
                  source: rect
              }
          }
      }
      

        1. qtbug41687.zip
          2 kB
          Mitch Curtis
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes