Skip to content

Update Qt Designer sample editor to PyQt6#789

Open
realpython-bot wants to merge 1 commit into
realpython:masterfrom
realpython-bot:qt-designer-python-pyqt6
Open

Update Qt Designer sample editor to PyQt6#789
realpython-bot wants to merge 1 commit into
realpython:masterfrom
realpython-bot:qt-designer-python-pyqt6

Conversation

@realpython-bot

Copy link
Copy Markdown
Contributor

Summary

Migrates the qt-designer-python sample text editor from PyQt5 to PyQt6, to pair with the in-progress light update of the Qt Designer and Python tutorial (Trello: Light Update card RIngq9rw).

Changes

  • sample_editor/main_window_ui.py — regenerated with pyuic6 (PyQt6 6.11.0). This automatically applies the PyQt6 API changes: QAction is now imported from QtGui, and enums are fully scoped (for example, Qt.ToolBarArea.TopToolBarArea).
  • sample_editor/app.py — imports updated from PyQt5 to PyQt6 (the only change needed; .exec() was already in use).
  • README.md — install instructions updated to PyQt6.

The .ui files are unchanged, since they're binding-agnostic.

Verification

Built and ran headless on Python 3.14 with PyQt6 6.11.0:

  • setupUi() constructs the main window (all 10 actions present)
  • uic.loadUi("ui/find_replace.ui", ...) loads the dialog

Note

This should merge alongside publication of the updated tutorial. The article clone (CMS post #2238) is still pending its screenshot refresh and final QA.

🤖 Generated with Claude Code

Migrate the qt-designer-python sample text editor from PyQt5 to PyQt6
to match the refreshed tutorial:

- Regenerate main_window_ui.py with pyuic6 (PyQt6 6.11.0)
- Update app.py imports to PyQt6 (QtWidgets and uic)
- Update README install instructions to PyQt6

Verified: the app builds its GUI (setupUi) and loads find_replace.ui
via uic.loadUi() under PyQt6 on Python 3.14.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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