I am working on a Qt App where I have a QListView. There are few items present in the list. My application requires items to be rearranged according to user\'s choice. Every
Use the QAbstractItemView::clearSelection function.
If you have subclassed QListView
you can just call it with clearSelection();
Use
void QAbstractItemView::clearSelection() [slot]
to clear selection
Also, all views have a selection model you can access through:
QItemSelectionModel * QAbstractItemView::selectionModel() const
that allows doing a lot more things selecting
Look at Handling selections in item views
Another thing ...
#ifdef QT_NO_DEBUG
means release
#ifndef QT_NO_DEBUG
would be debug mode, and im sure, it will not compile the code you pasted