I don't understand. If you click outside any item then the returned pointer will be null.
I don't understand. If you click outside any item then the returned pointer will be null.
found i think the answer
QModelIndex index = this->indexAt(pos);
then in the code..
if(index.isValid()) .....
You're using item based approach, so:
Qt Code:
if(item) { // item is valid }To copy to clipboard, switch view to plain text mode
Bookmarks