I am trying to get the currently selected file in Qtreeview without utilizing an event/callback related to Qtreeview itself. So far I have only been able to get the filename but not the path.
self.treeView.selectedIndexes()[0].data()
This just gives me the file...How do I get the full filepath?
This was as far as i got:
self.model=QtWidgets.QFileSystemModel()
self.model.setRootPath(QDir.currentPath())
self.treeView.setModel(self.model)