PDA

View Full Version : How to get Current index value in QlistView



boopathi33
2nd May 2013, 08:48
Hi,

I am using Qlistview to show some item, how to get the current selected index when i press up or down arrow ?..

Now i am getting the value when the cursor is focus on second item i get the index value of first item. how can i get the current selected index

wysota
2nd May 2013, 09:08
You mean current index or selected index? Those are not the same. You can access both via QItemSelectionModel and in addition to that QAbstractItemView::currentIndex() returns the current index.