1

Does QML StackView Status.Inactivestatus mean that when a view enters this state it's visibility is set to false implicitly? So I don't need to set the view's visibility to false explicitly for performance reasons?

Silex
  • 2,583
  • 3
  • 35
  • 59

1 Answers1

1

You could verify by adding the following to an item within the StackView:

onVisibleChanged: print(visible)

Looking at the code, it seems that they are indeed hidden:

/*! \internal */
function animationFinished()
{
    if (!__currentTransition || __currentTransition.animation.running)
        return

    __currentTransition.animation.runningChanged.disconnect(animationFinished)
    __currentTransition.exitItem.visible = false
    __setStatus(__currentTransition.exitItem, Stack.Inactive);
    __setStatus(__currentTransition.enterItem, Stack.Active);
    __currentTransition.properties.animation = __currentTransition.animation
    root.delegate.transitionFinished(__currentTransition.properties)

    if (!__currentTransition.push || __currentTransition.replace)
        __cleanup(__currentTransition.outElement)

    __currentTransition = null
}
Mitch
  • 23,716
  • 9
  • 83
  • 122
  • Thanks @Mitch for confirming! The code piece says it all. Printing out the variable was a good idea too though, should have thought about that. – Silex May 09 '16 at 12:49