문제

path = str(QtGui.QFileDialog.getExistingDirectory(self, "Select Directory  "))

How to read the file form directorydialog

도움이 되었습니까?

해결책

file = str(QtGui.QFileDialog.getOpenFileName(self, "Select File", "", "*.png *.jpg"))
print file

This will list only png and jpg files, type the file extension you want to list.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top