本文共 465 字,大约阅读时间需要 1 分钟。
如题,出现这个的原因是,如果你的窗口继承的是QMainwindow,需要设置
setCentralWidget();如下: * widget = new (mainWindow ); widget ->setLayout (gridLayout ); mainWindow ->setCentralWidget (widget ); 设置好一个widget即可
转载地址:http://csdxi.baihongyu.com/