StackLayout的使用

网友投稿 600 2022-12-01

StackLayout的使用

StackLayout的使用

qml文件:

import QtQuick 2.7import QtQuick.Controls 2.0import QtQuick.Layouts 1.3ApplicationWindow { visible: true id:idWindow width: 1024.0; // this is the designer width size height: 768.0; // this is the designer height size title: qsTr("Hello World") color: "#3A3223" StackLayout{id: idstackview; anchors.fill: parent; currentIndex: tabBar.currentIndex; One{id:test1} Two{id:test2} Third{id:test3} Four{id:test4} } Rectangle{ id: idfoot width: idWindow.width; height: 72; color: "#3A3223";anchors.bottom: parent.bottom Rectangle{width: parent.width; height: 1;color: "#928D85";} TabBar { onCurrentIndexChanged: { console.debug(tabBar.currentIndex) } id: tabBar; width: 700; height: 71;anchors.bottom: parent.bottom; background: Rectangle{color: "#3A3223"} currentIndex: 3 TabButton { width: height*1.2;height: 70; onClicked: { idWindow.close();/*idWindow.showMinimized();*/ }} TabButton { width: height*1.2;height: 70;} TabButton { width: height*1.2;height: 70;} TabButton { width: height*1.2;height: 70;} TabButton { width: height*1.2;height: 70;} } } }

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:jpa使用manyToOne(opntional=true)踩过的坑及解决
下一篇:cef3增加外壳程序
相关文章

 发表评论

暂时没有评论,来抢沙发吧~