QML StackView Status.Inactive
状态是否意味着当视图进入此状态时,它的可见性是否隐式设置为false?因为性能原因,我不需要明确地将视图的可见性设置为false?
答案 0 :(得分:1)
您可以通过将以下内容添加到StackView
onVisibleChanged: print(visible)
看code,似乎确实隐藏了它们:
/*! \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
}