From 9af1eb5ba648fed97260a6d3ca2aa7221cd1fb74 Mon Sep 17 00:00:00 2001 From: samuel-w Date: Sun, 17 Jan 2021 14:58:32 -0600 Subject: [PATCH] Fix file selector dialog (#764) --- src/vorta/utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vorta/utils.py b/src/vorta/utils.py index eaa940f5c..4d6cda2a8 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -111,12 +111,11 @@ def get_dict_from_list(dataDict, mapList): def choose_file_dialog(parent, title, want_folder=True): - options = QFileDialog.Options() - if want_folder: - options |= QFileDialog.ShowDirsOnly - dialog = QFileDialog(parent, title, os.path.expanduser('~'), options=options) + dialog = QFileDialog(parent, title, os.path.expanduser('~')) dialog.setFileMode(QFileDialog.Directory if want_folder else QFileDialog.ExistingFiles) dialog.setParent(parent, QtCore.Qt.Sheet) + if want_folder: + dialog.setOption(QFileDialog.ShowDirsOnly) return dialog