PDA

View Full Version : QListView tab focus for second row



ansar
2nd June 2010, 12:47
Hi,

In my application I am using QListview in icon mode and in the list view the 0th row is hidden i.e setRowHidden.And now the actual problem is when i press the tab key the tab focus is not coming to this listview (may be beacause of 0th row is hidden).
Somebody please help me to resolve this issue.

thanks....

aamer4yu
2nd June 2010, 15:34
Did you try with icon unhidden ?
Also where does the focus go ? and without seeing what code you have done, we might not be able to say much

ansar
4th June 2010, 07:29
Thanks for the reply..

Actually I am using setRowHidden(0,true); to hide the 0th row.This application also having 2 radio buttons, and 2 pushbuttons at the top and one label to show the 0th row item.The list is created as follows,

list->setViewMode(QListView::IconMode);
list->setWrapping(false);
list->setFlow(QListView::LeftToRight);
list->setSpacing(5);
list->setMovement(QListView::Static);
list->setHorizontalScrollMode(QAbstractItemView::ScrollP erItem);
list->setFrameShape(QFrame::NoFrame);
list->setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff);


and also using setItemDelegate .In this delegate I am just placing the text in the right side of the image instead of bottom.

Now initially the tab focus is on radio buttons, then to the push button.Then if again press the tab I don't knowwhere s this focus goes..!! .But if unhide the 0th row , focus goes to this 0th row of list.

One more thing I cant use setCurrentIndex of 1st row to move the highlight on this row.Because contents & behaviour of the label , radiobutton and button depends on the current index i.e 0.

Hope you understand my problem !