网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

如何让QHBoxLayout拥有层次感

时间:2024-10-12 22:22:37

1、打开Qt Creator,并新建一个Qt Widgets Application项目。

如何让QHBoxLayout拥有层次感

2、在左侧的目录中打开Forms下的mainwindow.ui。

如何让QHBoxLayout拥有层次感

3、在左侧Containers中拖动Frame到中间的设计器中。

如何让QHBoxLayout拥有层次感

4、在左侧Layout栏中拖动horizontal Layout到Frame中。

如何让QHBoxLayout拥有层次感

5、鼠标点击设计器中的Frame,并按下Ctrl+L,然后调整已经缩小的Frame到合适的大小。

如何让QHBoxLayout拥有层次感

6、选中Frame,然后在右下角的属性中找到QFrame下的frameShape,选择Panel,并确保frameShadow选中Sunken或Raised。

如何让QHBoxLayout拥有层次感

7、点击左侧的运行按钮或者按Ctrl+R运行程序,此时就实现了带有层次感的QHBoxLayout。

如何让QHBoxLayout拥有层次感
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com