1.简介与示例
StackView管理着view页面的生命周期,提供了页面的栈式导航。这些view页面可能有业务需要,根据业务需要,可以一级一级向深处跳转,根据当前view的状态与设定的情况,可能产生一个新view或者返回之前view
比如:注册账号分步骤,输入用户名,密码,点击下一步之后,出现新页面,输入兴趣爱好等
ApplicationWindow{
title:"StckViewDemo"
visible:true
height:300
width:530
StackView {
id:stack;
anchors.fill:parent
width:600
height:300
property var home :null;
Text {
text:"Cloxk to create first page"
font.pointSize: 14
font.bold: true
color: "blue"
anchors.centerIn: parent
MouseArea{
anchors.fill: parent
onClicked:
if(stack.depth==0)
stack.push(page);
}