Hi,
I am new in Qt and I i have a QTreeWidget and QTreeModel and I dont know how to get the selected filename when I click on the file in Tree Widget. Please send code If you can. (I really dont understand the model/view architecture.) Thanks a lot.
Printable View
Hi,
I am new in Qt and I i have a QTreeWidget and QTreeModel and I dont know how to get the selected filename when I click on the file in Tree Widget. Please send code If you can. (I really dont understand the model/view architecture.) Thanks a lot.
Well, you can connect to for example QAbstractItemView::activated(QModelIndex) or QAbstractItemView::clicked(QModelIndex) and use the index passed as parameter, or you can get the current index via QAbstractItemView::currentIndex().
Once you have the index at hand, you can do