1.簡介與示例
StackView管理著view頁面的生命周期,提供了頁面的棧式導航。這些view頁面可能有業務需要,根據業務需要,可以一級一級向深處跳轉,根據當前view的狀態與設定的情況,可能產生一個新view或者返回之前view
比如:注冊賬號分步驟,輸入用戶名,密碼,點擊下一步之后,出現新頁面,輸入興趣愛好等
ApplicationWindow{title:"StckViewDemo"visible:trueheight:300width:530StackView {id:stack;anchors.fill:parentwidth:600height:300property var home :null;Text {text:"Cloxk to create first page"font.pointSize: 14font.bold: truecolor: "blue"anchors.centerIn: parentMouseArea{anchors.fill: parentonClicked:if(stack.depth==0)stack.push(page);}