Unsolved Checkboxes in cells of QTableWidget are not coming correctly
-
I have following code
QTableWidget* t = new QTableWidget;
t->setRowCount(2)lQCheckBox* chkbox0 = new QCheckBox;
QCheckBox* chkbox1 = new QCheckBox;int col =0;
QWidget* wdg = new QWidget;
QHBoxLayout* layout = new QHBoxLayout(wdg);
layout->addWidget(chkbox0);
wdg->setLayout(layout);
t->setCellWidget(0, col, wdg);QWidget* wdg1 = new QWidget;
QHBoxLayout* layout1 = new QHBoxLayout(wdg1);
layout1->addWidget(chkbox1);
wdg1->setLayout(layout);
t->setCellWidget(1, col, wdg1);The checkboxes are not correctly properly the image is not coming proper
the boundaries of checkboxes in the cell are not coming properI tried to increase the row height setRowHeight , it did not work out .
Any suggestions would help
-
Hi
layout ->setContentsMargins(0,0,0,0);
is the cure.
The default margins cuts the checkbox.