PDA

View Full Version : multiselection in a tableview with CTRL Button



k.qasempour
17th July 2012, 08:44
hi all... i have a tableview in mu Qt Gui application... i wana let user to select multirows of table with pressing down CTRL button and click on them.... what shall i do?

mini_993
17th July 2012, 10:32
Can you try using the below properties for ur TableView:
<ur TableView Object Name> ->setSelectionMode(QAbstractItemView::MultiSelection );
<ur TableView Object Name> ->setSelectionBehavior(QAbstractItemView::SelectRows );

k.qasempour
17th July 2012, 10:39
thats right... but by this code the default mode of table would be multiselect.. i do not need this... read my question again..