Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.6
-
None
Description
Due to evaluation order, "itemAt(currentIndex)" is easily called too early and can therefore return null. A read-only "currentItem" property would help, and can be used in declarative bindings.
FocusScope { default property alias data: stack.data property alias currentIndex: stack.currentIndex readonly property alias currentItem: stack.itemAt(currentIndex) // oops StackLayout { id: stack anchors.fill: parent } }
Attachments
Issue Links
- relates to
-
QTBUG-76999 StackLayout: Add attached property 'index'
- Closed