Frage

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

How to read the file form directorydialog

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top