It's straight forward to understand the topLeft and bottomRight QModelIndex when using dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight)signal with a QTableView, but I'm confused with bottomRight when using dataChanged() with a QTreeView.
What does bottomRight exactly mean?
Can I update the whole tree view by just emit datachanged() signal once?
The dataChanged() signal from a model updates the view. The code emit dataChanged(QModelIndex(), QModelIndex()) will update the whole tree view. The call of tree view's update() doesn't work.
Code:
// update the whole tree views.
emit dataChanged(QModelIndex(), QModelIndex());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With