Update Qt Designer sample editor to PyQt6#789
Open
realpython-bot wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Migrates the
qt-designer-pythonsample text editor from PyQt5 to PyQt6, to pair with the in-progress light update of the Qt Designer and Python tutorial (Trello: Light Update cardRIngq9rw).Changes
sample_editor/main_window_ui.py— regenerated withpyuic6(PyQt6 6.11.0). This automatically applies the PyQt6 API changes:QActionis now imported fromQtGui, and enums are fully scoped (for example,Qt.ToolBarArea.TopToolBarArea).sample_editor/app.py— imports updated fromPyQt5toPyQt6(the only change needed;.exec()was already in use).README.md— install instructions updated to PyQt6.The
.uifiles 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 dialogNote
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