Qt 表格中插入QCheckBox并居中

来源:互联网 发布:mac电脑怎么退出全屏 编辑:程序博客网 时间:2024/05/21 18:40
    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);

0 0