Skip to content

Fix QGIS 4 compatibility: replace removed PyQt6.Qt monolithic import - #91

Merged
lachlangrose merged 9 commits into
mainfrom
copilot/fix-qgis-4-compatibility
Aug 3, 2026
Merged

Fix QGIS 4 compatibility: replace removed PyQt6.Qt monolithic import#91
lachlangrose merged 9 commits into
mainfrom
copilot/fix-qgis-4-compatibility

Conversation

CopilotAI commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

The plugin fails to load in QGIS 4 because PyQt6.Qt — the monolithic convenience module from PyQt5 — no longer exists in PyQt6.

Change

Replace the invalid import in dlg_settings.py with the correct PyQt6-compatible (and PyQt5-compatible) sub-module:

# Before (breaks QGIS 4 / PyQt6)fromqgis.PyQt.QtimportQUrl# Afterfromqgis.PyQt.QtCoreimportQUrl

QUrl has always resided in QtCore; the old import only worked because PyQt5.Qt re-exported the entire Qt namespace as a shortcut.

CopilotAI linked an issue Apr 8, 2026 that may be closed by this pull request
2 tasks
CopilotAI changed the title [WIP] Fix QGIS 4 support for loopstructural pluginFix QGIS 4 compatibility: replace removed PyQt6.Qt monolithic importApr 8, 2026
CopilotAI requested a review from lachlangroseApril 8, 2026 04:17
@lachlangrose
lachlangrose marked this pull request as ready for review August 3, 2026 07:58
@lachlangrose
lachlangrose merged commit 7692931 into mainAug 3, 2026
3 of 4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QGIS 4 not supported

2 participants

@lachlangrose