Skip to content

Fix file dialogs failing with PySide6 6.8/6.9 on Python 3.14 - #818

Open
cristianchiriac wants to merge 1 commit into
Syncplay:masterfrom
cristianchiriac:fix-pyside6-filedialog-options
Open

cristianchiriac wants to merge 1 commit into
Syncplay:masterfrom
cristianchiriac:fix-pyside6-filedialog-options

Conversation

@cristianchiriac

Copy link
Copy Markdown

Fixes #815.

With PySide6 6.8 or 6.9 on Python 3.14 (the combination Fedora 45 ships), calling QtWidgets.QFileDialog.Options() with no argument raises:

TypeError: EnumType.__call__() missing 1 required positional argument: 'value'

so File → Open media file and the other Browse buttons (player path, media directories, shared playlists, etc.) do nothing. QFileDialog.Option(0) is the same empty set of options, so this replaces the 8 argument-less Options() calls with it. The calls that pass a flag (Options(QFileDialog.DontUseNativeDialog) and so on) already work everywhere and are unchanged.

Testing: I created each value and passed it to QFileDialog.setOptions() (offscreen platform):

Python binding Options() Option(0)
3.14.7 PySide6 6.8.0 TypeError ok (0)
3.14.7 PySide6 6.9.0 TypeError ok (0)
3.14.7 PySide6 6.10.0 ok ok (0)
3.14.7 PySide6 6.12.0 ok ok (0)
3.10.21 PySide2 5.15.2.1 ok ok (0)

…y#815)

QFileDialog.Options() without an argument raises
'EnumType.__call__() missing 1 required positional argument: value'
there, so File > Open media file and the other Browse buttons did
nothing. QFileDialog.Option(0) is the same empty set of options and
works with PySide2 and all PySide6 versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File open dialog fails to open with PySide6

1 participant