mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
Fix "Choose..." dialog not opening on Qt6
When clicking on the "Choose..." button nothing would happen visually and it would show the error: Traceback (most recent call last): File "/home/user/dangerzone/dangerzone/gui/main_window.py", line 614, in select_output_directory dialog.setFileMode(QtWidgets.QFileDialog.DirectoryOnly) According to the PySide docs, QFileDialog.DirectoryOnly has been deprecated in Qt4.6 [1]. This was not an issue probably on PySide2 because it must have used an earlier Qt version. Fixes #360 [1]: https://doc.qt.io/qtforpython-5/PySide2/QtWidgets/QFileDialog.html#PySide2.QtWidgets.PySide2.QtWidgets.QFileDialog.FileMode
This commit is contained in:
parent
56c5d77afd
commit
e840c7a18c
1 changed files with 2 additions and 2 deletions
|
@ -610,8 +610,8 @@ class SettingsWidget(QtWidgets.QWidget):
|
||||||
# open the directory where the user last saved it
|
# open the directory where the user last saved it
|
||||||
dialog.setDirectory(self.dangerzone.output_dir)
|
dialog.setDirectory(self.dangerzone.output_dir)
|
||||||
|
|
||||||
# allow only the selection of directories
|
# Allow only the selection of directories
|
||||||
dialog.setFileMode(QtWidgets.QFileDialog.DirectoryOnly)
|
dialog.setFileMode(QtWidgets.QFileDialog.Directory)
|
||||||
dialog.setOption(QtWidgets.QFileDialog.ShowDirsOnly, True)
|
dialog.setOption(QtWidgets.QFileDialog.ShowDirsOnly, True)
|
||||||
|
|
||||||
if dialog.exec_() == QtWidgets.QFileDialog.Accepted:
|
if dialog.exec_() == QtWidgets.QFileDialog.Accepted:
|
||||||
|
|
Loading…
Reference in a new issue