-
Bug
-
Resolution: Done
-
P1: Critical
-
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 } } }