在PyQt4中打印:
s_filePath = QtGui.QFileDialog.getOpenFileName( None, 'Select a File', 'C:\\') print("This is the file",s_filePath)
('这是文件',PyQt4.QtCore.QString(u'C:/script.txt'))
在PyQt5中打印:
s_filePath = QtWidgets.QFileDialog.getOpenFileName( None, 'Select a File', 'C:\\') print("This is the file",s_filePath)
这是文件('C:/script.txt','所有文件(*)')
在PyQt4版本中可以运行,但PyQt5不能运行,那么PyQt5中的PyQt4.QtCore.QString等效吗?