Port apt-offline GUI from PyQt5 to PyQt6 #244
Draft
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.
Overview
This PR migrates the apt-offline GUI application from PyQt5 to PyQt6, ensuring compatibility with modern Qt6 framework and Python environments. PyQt6 is the current actively maintained version and provides better long-term support and security updates.
Changes
GUI Source Files (10 files)
Updated all GUI Python files to use PyQt6 instead of PyQt5:
apt-offline-gui
AptOfflineQtMain.py
,AptOfflineQtAbout.py
,AptOfflineQtSaveZip.py
AptOfflineQtCreateProfile.py
AptOfflineQtFetch.py
,AptOfflineQtFetchOptions.py
,AptOfflineQtInstall.py
AptOfflineQtInstallBugList.py
,AptOfflineQtInstallChangelog.py
Build System
Enhanced
apt_offline_gui/genui.sh
to support PyQt6:pyuic5
topyuic6
for UI compilation--from-imports
flag (now default behavior)setTabStopWidth
→setTabStopDistance
(PyQt6 API change)rcc
) integration with automatic PySide6→PyQt6 import conversionDependencies
Updated
requirements.txt
:pyqt5-dev-tools
→pyqt6-tools
API Changes Handled
The following PyQt5→PyQt6 API changes were addressed:
app.exec_()
app.exec()
QEvent.HoverEnter
QEvent.Type.HoverEnter
QEvent.HoverLeave
QEvent.Type.HoverLeave
QtCore.QObject.connect
).clicked.connect
)Testing
✅ All GUI modules import successfully
✅ Main window instantiates and displays correctly
✅ Resources compile and load properly
✅ CLI functionality unchanged (backward compatible)
✅ CodeQL security analysis passed with 0 vulnerabilities
Screenshot
The GUI maintains identical appearance and functionality while running on PyQt6
Building After This Change
Users building from source will need PyQt6 dependencies:
Backward Compatibility
Security
No security vulnerabilities were introduced. CodeQL analysis completed successfully with 0 alerts. The migration only updates the UI framework while maintaining all security-sensitive operations unchanged.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com
/usr/lib/apt/methods/https
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.