A checkbox is added correctly when I set the check state of a qtreewidgetitem, but I´m not able to check/uncheck it in my qtreewidget. What am I doing wrong?
QTreeWidgetItem* item =
new QTreeWidgetItem(parent);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable |
Qt::ItemIsSelectable);
item->setText(0, text);
item->setCheckState(1, Qt::Checked);
Aucun commentaire:
Enregistrer un commentaire