Add PySide6 support to gui.jl #634
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds PySide6 support to the GUI compatibility layer.
Changes Made
Updated `fix_qt_plugin_path() function to support both Qt5 and Qt6 configurations:
Added PySide6 to event loop callback by including it in the supported GUI frameworks list and adding the import for PySide6.QtCore
Added PySide6 module hook to automatically call `fix_qt_plugin_path() when PySide6 is imported
Updated documentation to include PySide6 in all relevant docstrings and parameter descriptions
Technical Details
The key insight from the issue discussion is that Qt6 uses a different configuration file format:
The updated function checks for qt6.conf first, then falls back to qt.conf for backward compatibility.
Testing
This change is designed to be backward-compatible and follows the exact approach suggested by @cjdoris in the issue comments. The implementation handles the platform-dependent path differences by using the Libraries entry from qt6.conf as recommended.
Fixes #632