View Full Version : current item in treeview
kernel_panic
30th October 2007, 20:08
hi all.
how can i get in a meinwindow which the current selected item in my treeview is?
marcel
30th October 2007, 20:14
Connect the currentChanged signal from QTreeView::selectionModel to some slot in your class and using the tree view model get the data at the index provided by that signal.
EDIT: forget that, use QTreeView::currentIndex in conjunction with the model and get the data of the current index. No need for signals/slots.
kernel_panic
30th October 2007, 20:26
QItemSelectionModel....
reading the docu helps.....
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.