|
.cpp写的QWidget类的自定义窗体对象和designer里添加的QGridLayout布局是么
如果想布局的话,要在代码里实现,参考函数
ui->gridLayout->addWidget();
下面是函数的接口参数
void QGridLayout::addWidget ( QWidget * widget, int row, int column, Qt::Alignment alignment = 0 )
Adds the given widget to the cell grid at row, column. The top-left position is (0, 0) by default.
The alignment is specified by alignment. The default alignment is 0, which means that the widget fills the entire cell. |
|