Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.7.1
-
None
Description
When navigating through items of a listview, the activeFocus property of the ListView toggles seemingly unnecessarily.
The root item's activeFocus does not change but the signal onActiveFocusChanged fires anyway. root item is not part of a focus scope.
import QtQuick 1.0 Column { id: root focus: true onActiveFocusChanged: console.log("root activeFocus changed " + root.activeFocus) ListView { model: 10 width: 200 height: 200 focus: true id: lv onActiveFocusChanged: console.log("listview activeFocus changed " + lv.activeFocus) delegate : Text { width: parent.width; text: model.modelData + " is the " + (activeFocus ? " activeFocus" : "") + (focus ? " focus" : "") + " item" ; font.bold: true color: activeFocus ? "red" : (focus ? "green" : "black") } } }