Question

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

How to read the file form directorydialog

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top