Dragonfire
Dragonfire

Reputation: 31

Qt dataChanged signal slower then hide/show the view

I implemented my own QAbstractItemModel (for TreeView) and override the setData method, that changes many childrens.

Why does hide/show call work?

Why is the datachanged Signal so slow?

firstIndex = idx.parent().child(firstChangedIndex.row(), 0)
self.dataChanged.emit(firstIndex, firstIndex)

firstChangedIndex = highest parent, that changes, but maybe not column 2

Upvotes: 2

Views: 1209

Answers (1)

Dragonfire
Dragonfire

Reputation: 31

I found my mistake ... The Trolltech modelest was enabled ... Thanks for the hint with the invalid QModelIndex ... work very well

Upvotes: 1

Related Questions