diff --git a/src/vorta/utils.py b/src/vorta/utils.py index de20e797..7ace88be 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -19,8 +19,8 @@ QAbstractItemView, QApplication, QFileDialog, + QListView, QSystemTrayIcon, - QTreeView, ) from vorta.borg._compatibility import BorgCompatibility @@ -178,8 +178,9 @@ def choose_file_dialog(parent, title, want_folder=True): dialog.setParent(parent, QtCore.Qt.WindowType.Sheet) if want_folder: dialog.setOption(QFileDialog.Option.ShowDirsOnly) - list_view = dialog.findChild(QTreeView) - list_view.setSelectionMode(QAbstractItemView.SelectionMode.MultiSelection) + list_view = dialog.findChild(QListView) + if list_view: + list_view.setSelectionMode(QAbstractItemView.SelectionMode.MultiSelection) return dialog