[Qt-interest] QTableWidget: allow or deny selection

Andre Somers andre at familiesomers.nl
Tue Mar 2 10:54:48 CET 2010


Paolino Marmolaro wrote:
>  
> thanks Alex, but setFlags is not the best solution for me.
>  
> I'm looking for a "aboutToSelect" signal fired on QTableWidgetItem, so 
> in the slot method I can verify the condition to allow or not the 
> selection.
>  
AFAIK, there is no such thing.
It would IMHO be very user-unfriendly too. It would be a complete 
suprise what can and what can't be selected. That makes your UI 
unpredictable. Why not tell the user what is available by setting the 
appropriate flags? That way, your UI has a chance to draw selectable 
items differently than non-selectable items, and your users will find it 
easier to deal with your interface.

André



More information about the Qt-interest-old mailing list