引用第7楼ppdayz于2013-05-04 16:52发表的 回 6楼(twfx1027) 的帖子 :
The QGridLayout class lays out widgets in a grid.
QGridLayout takes the space made available to it (by its parent layout or by the parentWidget()), divides it up into rows and columns, and puts each widget it manages into the correct cell.
基本上来说,QGridLayout 只是个布局。它做的事情就是让每个加入它的窗口部件在正确的位置显示出来,只有布局功能。
如果要显示效果的话,你需要的是继承QWidget的玩意儿。而QWidget本身挺难美化的,所以建议用QFrame。