View Full Version : current item in treeview
kernel_panic
30th October 2007, 19:08
hi all.
how can i get in a meinwindow which the current selected item in my treeview is?
marcel
30th October 2007, 19: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, 19:26
QItemSelectionModel....
reading the docu helps.....
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.