PDA

View Full Version : Can i get index list that showed in viewport?



jerry7
25th November 2010, 08:49
hi, Can i get the indexes that are showing in viewport of QListView/QTreeView?

thanks!

franz
26th November 2010, 20:58
You would probably have to write a little function that goes from the top of the view to the bottom and then use QAbstractItemView::indexAt() (http://doc.trolltech.com/latest/qabstractitemview.html#indexAt) to provide you with a model index. That will probably give you the info you want.