gitfourchette icon indicating copy to clipboard operation
gitfourchette copied to clipboard

`run.sh` hardcodes `QT_API=pyqt6`, overriding user's Qt binding preference

Open tomkoenecke opened this issue 1 month ago • 1 comments

The run.sh script sets export QT_API=${QT_API:-pyqt6} which overrides the user's "Preferred Qt binding" setting in the preferences dialog. I set PyQt5 as my preference in Settings → Advanced and launch via the run.sh script and get the warning: "Your preferred Qt binding pyqt6 is not available on this machine. Using pyqt5 instead."

So, it seems the environment variable QT_API takes precedence over the forceQtApi preference in ~/.config/gitfourchette/prefs.json.

Which might be fine, the warning just annoyed me when running this as a development version when qt6 isn't available.

tomkoenecke avatar Nov 04 '25 10:11 tomkoenecke

Ah yes, I think this line in run.sh dates back from when there wasn't reliable auto-detection logic for Qt bindings, but it's not really useful anymore. We can remove it from run.sh.

Otherwise, it's intended behavior for QT_API to take precedence, unless the binding is set in stone at build time (e.g. Flatpak, AppImage).

(Tangential heads-up: I plan to drop support for PyQt5 eventually, because it's slowly becoming "tech debt" as far as this codebase goes. Some features require special workarounds just for Qt 5 and/or they're finickier to test than with Qt 6.)

jorio avatar Nov 04 '25 20:11 jorio