StackView Push Appears To Have A Bug..
-
When you do a stackview.push() the item being pushed never receives an onVisibleChanged signal. None of the controls on the "item" receive the onVisibleChanged signal either.
When you do a stackview.pop() the item, and all the controls on the item, being popped do receive onVisibleChanged and visible is equal to false..as one would expect.
So what am I missing?
Is this the normal, expected operation of the stackview control?
The push() just does the default stackview slide animation..nothing special.
Are the onVisibleChanged signals being re-directed or eaten by something in QML on purpose? If so, what and how do I change that behavior?
From my way of thinking (not always correct), it would seem appropriate to emit a onVisibleChanged signal when the stackview slide animation of some item has completed.
-
OK..a little digging and reading of the docs (gosh that helps)..
stackView.push( {item: Qt.resolvedUrl( url ), properties: { objectName: name, visible: false }} );
If you pass the visible property as "false", at the end of the slide animation, visible is changed to "true" and the onVisibleChanged signal is emitted..as expected.
You would think "visible: false" should be the default in the "properties" list..
-
Or you could use the
StackView.status
attached property.