Example #1
0
 def __init__(self):
     self.startingDir = QDir.rootPath()
     self.dialog = QFileDialog()
     self.dialog.setFileMode(QFileDialog.FileMode())
     #self.rootdir = self.dialog.getExistingDirectory(None, 'Choose directory', self.startingDir)
     self.rootdir = QDir.rootPath()
     super(DirectoryDialog, self).__init__()
Example #2
0
def browseHandler():
    dialog = QFileDialog()
    dialog.setFileMode(QFileDialog.FileMode())
    dir = dialog.getExistingDirectory(None)
    if dir[-1] == "/":
        dir = dir[:-1]
    dir = dir.replace("/","\\")
    return(dir)