It\'s straight forward to understand the topLeft and bottomRight QModelIndex when using dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRigh
The dataChanged() signal from a model updates the view. The code emitdataChanged(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());