Reimplement mousePressEvent(), check event button & itemAt(), and if it returns null, call clearSelection().