用了QAbstractProxyItemModel后,QTreeView::currentIndex()返回错误的index,必须要用QAbstractProxyItemModel::mapToSource()才能得到真正的modelindex。这样的话,我必须要记住那个QTreeView/QListView等使用了proxyitemmodel,然后在处理各种事件的时候区分他们,这样非常麻烦。有办法能让QTreeView::currentIndex()返回真正的modelindex吗?我子类化QAbstractProxyItemModel后,只实现了两个函数 bool filterAcceptsRow(int row, const QModelIndex &parent) const; bool lessThan(const QModelIndex & left, const QModelIndex & right) const;