woodtluk
8th October 2010, 10:53
Hi there
I've got a list model that is derived from QAbstractListModel. There I try to set the flags:
Qt::ItemFlags MembersListModel::flags(const QModelIndex& index) const {
if(index.isValid())
return Qt::ItemIsEnabled;
}
Later I want to set different flags for different kinds of items.
But somehow this is not working at all. All the items are selectable and checkable (with a checkbox).
What am I doing wrong? Could it be that I missed something in the delegate?
Thx Luke
I've got a list model that is derived from QAbstractListModel. There I try to set the flags:
Qt::ItemFlags MembersListModel::flags(const QModelIndex& index) const {
if(index.isValid())
return Qt::ItemIsEnabled;
}
Later I want to set different flags for different kinds of items.
But somehow this is not working at all. All the items are selectable and checkable (with a checkbox).
What am I doing wrong? Could it be that I missed something in the delegate?
Thx Luke