Skip to content

Support Qgis 4#205

Merged
JoerivanEngelen merged 15 commits into
masterfrom
support_qgis_4
Jun 23, 2026
Merged

Support Qgis 4#205
JoerivanEngelen merged 15 commits into
masterfrom
support_qgis_4

Conversation

@JoerivanEngelen

@JoerivanEngelen JoerivanEngelen commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #191

Converted with the script https://github.com/qgis/QGIS/wiki/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6

Had to manually fix two things:

  • a 0 had to be changed to the explicit enumerator.
  • a bool had to be changed to an explicit enumerator for the surpress message box radio button

I also explicitly set the permissions for GitHub pages, so that that doesn't break anymore

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the QGIS-Tim plugin to be compatible with QGIS 4 by switching PyQt imports to qgis.PyQt and updating numerous QGIS/Qt enum references to their scoped (Qt6-style) forms. It also bumps the development version to 0.7.0.dev2 and updates documentation/tutorial requirements to no longer exclude QGIS 4.

Changes:

  • Migrated PyQt imports across the plugin from PyQt5 to qgis.PyQt and updated scoped enums for QGIS 4 / Qt6 compatibility.
  • Updated QGIS API enum usages (message levels, task flags, layer proxy filters, raster/mesh settings, etc.).
  • Bumped package/plugin versions to 0.7.0.dev2 and adjusted docs/tutorial requirements around supported QGIS versions.

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Version bump to 0.7.0.dev2.
pixi.toml Version bump and QGIS dependency range adjusted for dev env.
gistim/init.py Version bump to 0.7.0.dev2.
plugin/qgistim/metadata.txt Declares QGIS max version and bumps plugin version/changelog.
plugin/qgistim/qgistim.py Updates dock widget area enum usage for Qt6-style enums.
plugin/qgistim/resources.py Switches resource module import to qgis.PyQt.
plugin/qgistim/core/task.py Updates task cancel flag and message level enums.
plugin/qgistim/core/processing.py Updates QtCore imports and QGIS enum scoping (mesh resampling, temporal mode).
plugin/qgistim/core/layer_styling.py Updates QtGui import and QGIS enum scoping for styling/statistics/label placement.
plugin/qgistim/core/geopackage.py Updates QgsVectorFileWriter enums for QGIS 4 API.
plugin/qgistim/core/elements/aquifer.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/building_pit.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/circular_area_sink.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/constant.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/discharge_observation.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/domain.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/element.py Switches widget imports to qgis.PyQt and replaces exec_() with exec().
plugin/qgistim/core/elements/head_line_sink.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/headwell.py Switches Qt imports (QVariant, QColor) to qgis.PyQt.
plugin/qgistim/core/elements/impermeable_line_doublet.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/leaky_building_pit.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/leaky_line_doublet.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/line_sink_ditch.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/observation.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/particle.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/polygon_area_sink.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/polygon_inhomogeneity.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/polygon_semi_confined_top.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/uniform_flow.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/core/elements/well.py Switches QVariant import to qgis.PyQt.
plugin/qgistim/widgets/compute_widget.py Updates Qt imports and QGIS enum scoping (filters, alignment, task dependency, mesh resampling).
plugin/qgistim/widgets/dataset_widget.py Updates Qt imports and enum scoping (selection mode, sizing, header resize mode, message levels, unit enums, message box buttons).
plugin/qgistim/widgets/elements_widget.py Switches widgets import to qgis.PyQt and updates message level enum.
plugin/qgistim/widgets/error_window.py Switches widgets import to qgis.PyQt (formatting cleanup).
plugin/qgistim/widgets/install_dialog.py Switches Qt imports to qgis.PyQt and updates task flags / message levels / button enums / alignment enum.
plugin/qgistim/widgets/tim_widget.py Switches Qt imports to qgis.PyQt and updates suppress/alignment enums.
docs/install.qmd Updates supported QGIS version wording to allow QGIS 4+.
docs/tutorial_TheHague.qmd Updates requirements to allow QGIS 4+.
docs/tutorial_Rijsenhout.qmd Updates requirements to allow QGIS 4+.
docs/tutorial_particle_tracking.qmd Updates requirements to allow QGIS 4+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pixi.toml Outdated
Comment thread plugin/qgistim/widgets/install_dialog.py
@JoerivanEngelen JoerivanEngelen merged commit 9ddf5d9 into master Jun 23, 2026
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.

QGIS 4.0 Compatibility

2 participants