I am editing a widget with a QTreeView connected with a QDirModel. I want to enable a `rename' function in the context menu. However, I could not find a way to emit a clicked() signal from the code to make the item selected into editing mode.
I used
where tv_current_directory is the QTreeView object. Obviously, VS2005 complains that I am trying to access the protected member of QAbstractItemView.QModelIndex index = this->ui_.tv_current_directory->currentIndex();
emit this->ui_.tv_current_directory->clicked( index );
What should I do then? Thanks.
Bookmarks