Is there a way to remove the checkbox from a QTreeWidgetItem?

It is possible to remove the checbox from a QTreeWidgetItem [] that has the Qt::ItemIsUserCheckable [] flag set, simply by calling setData() [] on the item with an invalid QVariant [], e.g

  1.     item->setData(0, Qt::CheckStateRole, QVariant());

1 comment

July 26, 2012

Picture of pasomas pasomas

Lab Rat

But…is not valid for a QTableView with QSqlQueryModel ?

  1. model->setData(idxToSet, QVariant(), Qt::CheckStateRole);

Doesn’t seem to work…how can i do?

Write a comment

Sorry, you must be logged in to post a comment.