如何从QFileSystemModel中提取文件路径?

时间:2012-02-04 11:09:49

标签: pyqt4 qfilesystemmodel

 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))

当我执行上面的代码时,我收到以下错误

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

0 个答案:

没有答案