What does 'bottomRight' mean when using dataChanged() with a QTreeView in Qt?

前端 未结 2 1023
夕颜
夕颜 2021-01-18 01:59

It\'s straight forward to understand the topLeft and bottomRight QModelIndex when using dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRigh

2条回答
  •  一向
    一向 (楼主)
    2021-01-18 02:14

    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());
    

提交回复
热议问题