[Qt-interest] Deselecting QTableView cells when losing focus - properly?

Paul Miller paul at fxtech.com
Mon Jun 15 17:02:05 CEST 2009


I have some views that have multiple QTableViews in them. When I switch 
focus between the table views, I want to deselect all the cells in the 
previously-selected view.

At first I tried overriding focusOutEvent(), and calling 
selectionModel()->clear(), but, when you go to edit an item, the text 
editor kicks in for that cell which ALSO causes a focusOutEvent(), so I 
can't do that.

Is there a proper way to do this?

-- 
Paul Miller | paul at fxtech.com | www.fxtech.com | Got Tivo?




More information about the Qt-interest-old mailing list