[Qt-interest] QTableView single Row Selection

Sean Harmer sean.harmer at maps-technology.com
Sun Apr 26 22:05:23 CEST 2009


Neel Basu wrote:
> On Sunday 26 April 2009 22:51:08 Donal O'Connor wrote:
>   
>> and setSelectionMode(QAbstractItemView::SingleSelection);
>> If you want to make it possible to select a single row only.
>>     
> I've already Done from designer
> selectionMode = SingleSelection
> selectionBehavior = selectRows
>
> and only one row is being selected at a time
> but my problem is 
> Its not looking like that
> I don't want to give a Cell an Identity just the row has some Identity
> But Here the selection looks as two Cells in the same row has been selected.
> and I don't want to highlight a Cell on mouseover
> Ya If a Row get's highlighted on mouseover then its ok
>
> If you take a look at the two Images I've attached you will notice the 
> differences
>   
I think the only way to do this is to use a QTreeView. At least I could 
not get a QTableView to appear as you wish either.

Sean




More information about the Qt-interest-old mailing list