QTableView has unwanted checkboxes in every cell
Do you by any chance happen to set the Qt::ItemIsUserCheckable flag in flags()?
Try changing MyTableModel::data()
to the following:
QVariant MyTableModel::data(const QModelIndex& index, int role) const
{
if (role == Qt::DisplayRole)
return "foo";
else
return QVariant();
}
Probably the returned QVariant for role Qt::CheckStateRole
was misunderstood by the QTableView.