In PyQt, how does one display a file browser that shows and selects only directories (not files)?
And how does one retrieve the name of the selected directory?
From inside your QDialog/QWidget class, you should be able to do:
file = str(QFileDialog.getExistingDirectory(self, "Select Directory"))