Hi
I have a QTableView with the selection set to:
m_table->setSelectionBehavior(QAbstractItemView::SelectRow s);
m_table->setSelectionMode(QAbstractItemView::ExtendedSelec tion);
the associated model contains elements with the Qt::CheckStateRole role and flags
set to:
flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsUserCheckable;
When the user clicks on a checkbox it all nicely changes state and all. However is also changes the selection. ie if the user checks on a box of an item in a non selected row, that row becomes selected.
I tried overridding the EditorEvent in a QItemDelegate() but the selection change happens before it reaches that code.
Any idea how I can prevent the selection from being changed when the user click in the check box (but work as before if clicked outside) ?
Cheers
Bookmarks