Skip to content

feat(UI): migrate to PyQt6 - #446

Merged
tlecomte merged 1 commit into
masterfrom
pyqt6
Aug 4, 2026
Merged

feat(UI): migrate to PyQt6#446
tlecomte merged 1 commit into
masterfrom
pyqt6

Conversation

@tlecomte

@tlecomte tlecomte commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Migrate from PyQt5 (now obsolete) to latest PyQt6. This was partly done with assistance from OpenCode and Laguna S 2.1.

Functionality is preserved.

Some of the previous patterns for passing data to the views as initial properties were not working anymore after the migration. Instead, we use context properties.

@tlecomte
tlecomte marked this pull request as ready for review August 4, 2026 12:23
@tlecomte tlecomte changed the title Pyqt6 feat(UI): migrate to PyQt6 Aug 4, 2026
Key changes:
- Bulk PyQt5 -> PyQt6 import migration across 66 Python files
- Fix Qt6 API changes: QSG* enum namespaces, QImage.Format, QMessageBox, etc.
- Replace setInitialProperties/createWithInitialProperties for QObject values
  with setContextProperty approach (Qt6 voidptr issue)
- Fix pyqtProperty type annotations: use QObject instead of specific
  QObject subclass types for properties accessed from QML
- Update pyuic6-generated ui files (ui_friture.py, ui_settings.py)
- Fix QML enum namespaces and property access patterns
- Regenerate Cython extensions for Qt6
- Update packaging and install scripts for PyQt6
  - Update friture.spec for Qt6 module/binary names
  - Update install scripts: pyuic5/pyrcc5 -> pyuic6/pyrcc6
  - Update INSTALL.md with PyQt6 instructions
  - Fix codesign script for PyQt6 bundle names
- Add QML-Python integration tests
  - Tests context property access, child context isolation for dock widgets,
property type exposure through pyqtProperty, and Scope_Data nested property
accessibility from QML - replacing manual testing of Qt6 migration fixes.
- Rename on*Clicked methods to trigger*Clicked in ControlBarViewModel
  to avoid Qt6 signal handler auto-connection warnings
- Replace shortcut: 'Space' with Keys.onSpacePressed in FritureMainWindow.qml
  (Qt6 Controls removed the shortcut property on ToolButton)
- ToolButton.shortcut property removed in Qt6. Use Shortcut {} type
from QtQuick which works globally without requiring focus.
- Update ControlBar.qml to use new method names
- Add @pyqtSlot decorators for QML-callable methods
- Remove unused QtQuick.Dialogs 1.3 import
Qt6's QtQuick.Dialogs module doesn't support versioned imports (1.3 not installed).
The import was unused in Generator.qml so removing it entirely.
- Fix generator widget visibility and control bar method calls
  - Add Layout.fillWidth: true to generator settings in Generator.qml
  so ColumnLayout properly manages them in Qt6
  - Change generatorRoot.viewModel.X to viewModel.X (context property access)
  - Use property var instead of typed property declarations in generator settings QML
  - Change pyqtProperty types to QObject in Generator_View_Model
  - Add @pyqtSlot to ControlBarViewModel trigger methods (required by Qt6)
  - Add generator widget visibility and property exposure tests
- Fix generator settings property name collision
The 'viewModel' property name on settings components shadowed the
'viewModel' context property in Qt6's evaluation scope. Renaming
to 'settingsViewModel'
Added Layout.fillWidth: true for proper ColumnLayout management.
- Fix spacebar shortcut to work globally
Default Qt.WindowShortcut context only works when the specific
window has focus. Qt.ApplicationShortcut makes it work app-wide,
including when dialogs are open.
- Fix playback control signals
@tlecomte
tlecomte force-pushed the pyqt6 branch 2 times, most recently from ce210e7 to bc45402 Compare August 4, 2026 12:38
@tlecomte
tlecomte merged commit e0fd638 into master Aug 4, 2026
4 checks passed
@tlecomte
tlecomte deleted the pyqt6 branch August 4, 2026 12:44
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.

1 participant