how to extract file path from QFileSystemModel?

900 views Asked by At
 def nukeScriptFolder(self, index = QModelIndex()):

         index = self.dirmodel.index(QDir.currentPath())

         fileInfo = QtCore.QFileInfo(self.dirmodel.fileInfo(index))
         #print fileInfo.fileName()        
         #path = self.dirmodel.fileinfo(index).absoluteFilePath()
         self.fileView.setRootIndex(filemodel.setRootPath(path))

When I execute the above code I get the following error

     path_index = self.dirmodel.index(QDir.currentPath()).toString()
     TypeError: 'sip.methoddescriptor' object is not callable  
0

There are 0 answers