Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
Description
Run the code below. Press anywhere on the screen to change the
Rectangle's "enabled" property to false. This should result in the
rectangle turning red and the text turning gray, but the latter
does not happen. Replacing the TextInput with a TextEdit yields
the expected result, so this is an issue with TextInput specifically.
import QtQuick 2.0 Rectangle { width: 300; height: 400 Rectangle { width: 250; height: 25 anchors.centerIn: parent color: enabled ? "green" : "red" enabled: !mouseArea.pressed // TextEdit { // works TextInput { // doesn't work anchors.centerIn: parent text: "Press mouse button to !enable" font.bold: true color: enabled ? "black" : "gray" } } MouseArea { id: mouseArea anchors.fill: parent } }