When you have a view, you will have a model that will be used to select the item. He is called QItemSelectionModel.
For example, with, QListViewyou can get selectionModel as follows:
QItemSelectionModel* selectionModel() const;
Now, with this model, you can connect to many signals:
void currentChanged ( const QModelIndex & current, const QModelIndex & previous )
void currentColumnChanged ( const QModelIndex & current, const QModelIndex & previous )
void currentRowChanged ( const QModelIndex & current, const QModelIndex & previous )
void selectionChanged ( const QItemSelection & selected, const QItemSelection & deselected )
, !