Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
Description
Run the code below. Click on the text to focus it (note that the
background turns green). Press anywhere outside (on the white) to
set the TextEdit.enabled to false. This should result in the TextEdit
loosing focus (cursor disappearing) and the background turning red,
but it doesn't.
import QtQuick 2.0 Rectangle { width: 300; height: 400 MouseArea { id: mouseArea anchors.fill: parent } TextEdit { id: textEdit anchors.centerIn: parent enabled: !mouseArea.pressed text: "Press mouse button\noutside to !focus" font.bold: true Rectangle { anchors.fill: parent z: -1 color: parent.activeFocus ? "green" : "red" } } }
Attachments
For Gerrit Dashboard: QTBUG-22404 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
13916,2 | Update item focus when the enabled property is changed. | master | qt/qtdeclarative | Status: MERGED | +2 | 0 |