Unsolved Accessig StackView current item's properties by id
-
Ok we have
RootComponent { StackView { id: stack initialItem: itemWrapper ... } Component { id: itemWrappr Item { id: item1 ... } } RandomButton { onClicked: { item1.prop = "hello World"; } } }
we get refference error. Why and what is the approach to overcome this. How to access Component's properties?
-
itemWrappr.prop = "hello World";
-
To access the stackview current item's property, you need to use this:
stack.currentItem.property