Clear selection when clicking on blank area of Item View
I made a tree structure with QTreeWidget , and it works well. But I have a problem with that. Commonly, with a tree structure, if I want to deselect all, I click on a blank area of the tree-widget. But QTreeWidget does not seem to support that (or I can't find out how). Could sub-classing or something else solve the problem? Determining a click on a blank area seems the key to the solution, but I can't find a signal or anything. The example code below will clear the selection (and current item) when clicking on a blank area, or when pressing Esc when the tree widget has the keyboard focus. It