tags:

views:

76

answers:

1

Hi All,

How can I make QListView item selection loop from bottom item to top (by pressing navigation key, down) and from top item to bottom (by pressing navigation key, up)? Is there a flag to be defined or some other way? My listview is in IconMode I wanted the selection to go to next row's 1st item when I've reached the end of a row.

Thanks

A: 

Hi,

Its Default behavior provided by the list view for iconic mode. in order to achieve your requirement, you need to handle it manually.

i.e you will be having the count of items in a row, once you reach the last item handle the right navigation key press event, then focus it back to the first element of the same row..

to get the navigation keypress event, either you install event filter or ovveride the keypress event function.

Shadow
Okay :).. thought there would be some property setting which I could directly keep the selection happening.
new_to_qt
probably, just check the documentation once else go ahead with the manual implementation..
Shadow