Hi there,
I'm add a QCheckBoxin my QTreeWidget like these, but, How to set the widget to be center of the column rect?
Qt Code:
  1. treeWidget->setItemWidget(subItem, 2, chkItem);
  2. subItem->setTextAlignment(2, Qt::AlignHCenter);
  3. Qt::CheckState chkState = (bNeedSync.toInt() == 1) ? Qt::Checked : Qt::Unchecked;
  4. chkItem->setCheckState(chkState);
To copy to clipboard, switch view to plain text mode 
I digged the code and this forum and no without any tip information. Thanks.
image.PNG