思路:QTableWidgetItem :item->setData(Qt::CheckStateRole,QVariant());
QTreeWidgwtItem :item->setData(0,Qt::CheckStateRole,QVariant());详细参考帮助文档;