Skip to content

Remove supportsQt6 check from metadata.txt and specific QGIS 4.0 conditions#250

Merged
Xpirix merged 1 commit intoqgis:masterfrom
Xpirix:remove_supportsQt6
Mar 6, 2026
Merged

Remove supportsQt6 check from metadata.txt and specific QGIS 4.0 conditions#250
Xpirix merged 1 commit intoqgis:masterfrom
Xpirix:remove_supportsQt6

Conversation

@Xpirix
Copy link
Copy Markdown
Collaborator

@Xpirix Xpirix commented Mar 4, 2026

Closes #249

See also qgis/QGIS#65146 and qgis/QGIS#65168

This will remove all supports related to the supportsQt6 field from the metadata and also remove all specific conditions related to QGIS 4.0 and revert back to the initial conditions.
So all plugins version that have qgisMaximumVersion >= 4.0 will be considered as compatible with QGIS 4.0.

Cc @borysiasty @3nids

pluginversion__min_qg_version__gte=f"{settings.CURRENT_QGIS_MAJOR_VERSION}.0",
pluginversion__supports_qt6=True,
deprecated=False,
pluginversion__max_qg_version__gte=f"{settings.NEW_QGIS_MAJOR_VERSION}.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am really not sure, but does this translate <= 4.0 while we should have < 4.0 ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes @3nids , we are checking the plugin versions that have max_qg_version greater than or equal to 4.0.
However, could you please explain why we should have < 4.0?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just trying to understand what it was doing, but this is really new and apparently too early :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Actually, this will bring us back to the original behaviour before we implemented the supportsQt6 metadata and tweaked conditions for QGIS 4.0. So on the QGIS 4 plugins list, we will have plugins that have explicitly set qgisMaxVersion to at least 4.0.

For example:

  • Min QGIS Version 3.22 and Max QGIS Version 4.0 -> QGIS 4.0 and QGIS > 3.22 list
  • Min QGIS Version 4.0 and Max QGIS Version 4.99 -> Only QGIS >= 4 to 4.99 list
  • Min QGIS Version 3.22 and Max QGIS Version 3.99 -> Only QGIS 3.22 to QGIS 3.99 list

Is that what is expected @borysiasty? Perhaps I also misunderstood the requirements.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also, this specific change on the model.py file is only for the QGIS 4 Ready Plugins list at https://plugins.qgis.org/plugins/new_qgis_ready/, as we don't have a filter by QGIS version on the website.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, it's exactly how it worked before introduction of this tag.

@Gustry
Copy link
Copy Markdown
Contributor

Gustry commented Mar 5, 2026

Quite a few of plugins already adopted this flag supportsQt6 :

https://github.com/search?q=supportsQt6&type=code 354 occurrences, but I know there is a LOT of of false positive with forks etc.

Maybe raise a warning in the plugin validator if this flag is found explaining that this is deprecated ?

@Gustry
Copy link
Copy Markdown
Contributor

Gustry commented Mar 5, 2026

There are 316 plugins which have used this flag, I think it's fair to explain that this tag "was used" but due to recent changes in QGIS 4.0 release, this flag is not used anymore and the new way should be explain.

https://plugins.qgis.org/plugins/new_qgis_ready/

There are blog article etc explaining this flag supportsQt6 like https://geotribu.fr/articles/2025/2025-01-28_tester-qgis-4-futur-sig-open-source/#je-maintiens-un-plugin-comment-faire-pour-quil-soit-compatible from @Guts

I will add a note in the wiki https://github.com/qgis/QGIS/wiki/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6

@borysiasty
Copy link
Copy Markdown
Member

@Gustry: good point about explaining this change. I'm going to update the wiki: qgis/QGIS#65169

If you're aware of other places mentioning the old rules, feel free to add them to that ticket.

@Xpirix
Copy link
Copy Markdown
Collaborator Author

Xpirix commented Mar 6, 2026

Merging this now and will append any additional fixes later.

@Xpirix Xpirix merged commit 0c42ad0 into qgis:master Mar 6, 2026
2 checks passed
@Xpirix
Copy link
Copy Markdown
Collaborator Author

Xpirix commented Mar 6, 2026

Deployed just now @borysiasty . The XML lists can take up to 30 minutes to get updated.

@Gustry
Copy link
Copy Markdown
Contributor

Gustry commented Mar 7, 2026

Thanks for merging and working on this.

However, there were 316 plugins compatible QGIS 4 yesterday, now there are only 213 plugins compatible. It really brings confusion to users (mostly PyQGIS devs) why their plugin suddenly disappeared from the list, without any notice or explanation. I know it's not easy, but let's try to improve a little bit.

Is-it possible to add a message on top of https://plugins.qgis.org/plugins/new_qgis_ready/ with a bar explaining "How to upgrade your plugin QGIS 4 ? Your plugin is not on this list ? PLease read the wiki page" ?

(Checked on https://plugins.qgis.org/plugins/new_qgis_ready/)

@borysiasty
Copy link
Copy Markdown
Member

Hi @Gustry,

Good catch regarding the need to better advertise the need to fix plugin metadata.

Just to clarify: please note that it’s not that something suddenly stopped working. It actually never worked properly, and those 316 − 213 = 103 plugins were not truly available for download in QGIS 4!

They did work in QGIS 4 if they had already been installed in QGIS 3, which was even more confusing: plugin authors could see their plugin installed, and the plugin webpage indicated that everything was fine. Only one detail suggested that something was wrong: the “(re)install” button in the plugin manager was grayed out, but that was easy to miss.

So I suspect that the authors of the 213 fully compatible plugins simply noticed the grayed-out button and updated qgisMaximumVersion to 4.x.

@kannes
Copy link
Copy Markdown
Contributor

kannes commented Mar 19, 2026

Thank you for the hard work on this but to be honest, I am now more confused than ever, although the answer is probably easy.

  • Plugins, that should stay with QGIS 3 only:
    • qgisMinimumVersion=3.x and optionally qgisMaximumVersion<4.0
  • Plugins, that want to be shown by the plugins repo and load in QGIS 3 and 4:
    • qgisMinimumVersion=3.x and qgisMaximumVersion>=4.0
  • Plugins, that are with QGIS 4 only:
    • qgisMinimumVersion=4.x and optionally qgisMaximumVersion>=4.0

Am I reading it correctly?

@borysiasty
Copy link
Copy Markdown
Member

@kannes You’re absolutely right. By default, it’s simply assumed the plugin works from the qgisMinimumVersion up to the end of that major version line. By also setting the qgisMaximumVersion you can either restrict or extend this assumption.

@Guts
Copy link
Copy Markdown
Contributor

Guts commented Mar 19, 2026

Thanks @kannes for asking, I was also confused.
An ultimate question @borysiasty @Xpirix: we have to remove supportsQt6 from our plugins'metadata.txt? I need to have a clear idea before removing it from the templater I maintain https://gitlab.com/Oslandia/qgis/template-qgis-plugin/-/blob/4264a4e406008e0845a9ad1690b5bfb9f985ed73/plugin_%7B%7Bcookiecutter.plugin_name_slug%7D%7D/%7B%7Bcookiecutter.plugin_name_slug%7D%7D/metadata.txt#L23

@Xpirix
Copy link
Copy Markdown
Collaborator Author

Xpirix commented Mar 19, 2026

Hi @Guts , yes. I think that's definitely the suggestion here. Please also see https://plugins.qgis.org/docs/migrate-qgis4.

@Guts
Copy link
Copy Markdown
Contributor

Guts commented Mar 19, 2026

@Xpirix thanks. Maybe mention the pyqgis4-checker tooling?

@Xpirix
Copy link
Copy Markdown
Collaborator Author

Xpirix commented Mar 19, 2026

@Xpirix thanks. Maybe mention the pyqgis4-checker tooling?

Could you please share more details, as I'm not familiar with it? So will create another issue for that.

@kannes
Copy link
Copy Markdown
Contributor

kannes commented Mar 25, 2026

Sorry to bump this again, but I noticed that https://plugins.qgis.org/docs/migrate-qgis4 says:

QGIS 4 compatibility is now determined exclusively by the qgisMaximumVersion field in metadata.txt. A plugin version is shown in the QGIS 4 Ready Plugins list when qgisMaximumVersion ≥ 4.0.

This contradicts the list I posted above regarding QGIS4-exclusive plugins and that @borysiasty said was correct.

Also it contradicts @Gustry text in qgis/QGIS#65169 (comment):

If your plugin is intended to support more than one major QGIS version (e.g. both QGIS 3 and 4), you must explicitly set qgisMaximumVersion in metadata.txt, for example: qgisMaximumVersion=4.99. Otherwise your plugin will not be loaded by QGIS 4. However, if your plugin only targets QGIS 4 and no longer supports QGIS 3.x, simply set qgisMinimumVersion=4.0 and do not define qgisMaximumVersion (it's optional).

Sorry for not noticing it earlier and for abusing this issue for questions.

Is it correct, that a QGIS4-exclusive plugin just needs the qgisMinimumVersion? In that case the documentation page is wrong/misleading.

@borysiasty
Copy link
Copy Markdown
Member

Thanks for raising this inconsistency. @Xpirix, it's just wording, isn't it?

@Xpirix Xpirix mentioned this pull request Mar 26, 2026
@Xpirix
Copy link
Copy Markdown
Collaborator Author

Xpirix commented Mar 26, 2026

Thanks for raising this @kannes and @borysiasty. Yes, there are some mistakes in the docs. I have created an issue (#272 ) to fix them.

Guts added a commit to geotribu/qtribu that referenced this pull request Apr 7, 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.

Remove supportsQt6 tag from metadata.txt

6 participants