如何让QHBoxLayout拥有层次感
1、打开Qt Creator,并新建一个Qt Widgets Application项目。

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

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

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

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

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

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