Qt垂直/水平布局管理器(QBoxLayout,QHBoxLayout, QVBoxLayout)
实现思路:把QCheckBox嵌入式到一个水平布局中
QWidget *widget = new QWidget;
QHBoxLayout *layout = new QHBoxLayout;
QCheckBox *box = new QCheckBox;
layout->addWidget(box);
layout->setMargin(0);
layout->setAlignment(box,Qt::AlignCenter);
widget->setLayout(layout);
tblList->setCellWidget(0,0,widget);