Thanks for the tip. I went looking and found that we're using a subclass of QAbstractItemModel, but I assume that this would have the same effect.
Is there any extra info you could add, such as the command itself that would be changing the model?
Thanks for the tip. I went looking and found that we're using a subclass of QAbstractItemModel, but I assume that this would have the same effect.
Is there any extra info you could add, such as the command itself that would be changing the model?
Anything in your code that touches QTreeView::setSelectionModel(), selectionModel() or subclasses QItemSelectionModel would be a suspect. If you do not replace the selection model of the view then this is unlikely to be the cause.
If you have a totally hand-written model then it is also possible that the model's return for Qt::BackgroundRole is changing possibly without setData() emitting dataChanged() reliably.
Last edited by ChrisW67; 21st July 2013 at 22:46.
Bookmarks