Open nyalldawson opened 3 years ago
Thanks a lot for starting this.
Some questions:
Does this make Qt 5.15 the minimum Qt version to build QGIS by QGIS 3.18?
Instead of explicitly upgrade plugins to PyQt6, could we consider using an agnostic approach (qgis.PyQt), so that the plugin could (flawlessly?) work under PyQt5 and PyQt6 (and maybe Qt for Python). So the plugin could be flagged in metadata as PyQt5 (by default), PyQt6 or "ultimate approach (qgis.PyQt).
@3nids
Does this make Qt 5.15 the minimum Qt version to build QGIS by QGIS 3.18?
No -- we ifdef in support for older Qt versions
Instead of explicitly upgrade plugins to PyQt6, could we consider using an agnostic approach (qgis.PyQt), so that the plugin could (flawlessly?) work under PyQt5 and PyQt6 (and maybe Qt for Python). So the plugin could be flagged in metadata as PyQt5 (by default), PyQt6 or "ultimate approach (qgis.PyQt).
That's ideal, but ultimately it's up to the plugin author to do. It's not going to magically make the plugin compatible with Qt 6 either -- the plugin author will still need to put in conditional handling of Qt6 related API changes.
Thanks Nyall. +1 for me.
Do you think we should start adapting the code for the transition from qt5 to qt6 (I'm thinking in particular of QList vs QVector ).
@3nids Do we stay with PyQt/sip (sip6 is coming) or are we interested in PySide/Shiboken which is driven by Qt?
QWT could be replaced by QtChart -- but QtChart is GPL3
Do you think we should start adapting the code for the transition from qt5 to qt6 (I'm thinking in particular of QList vs QVector ).
Yes -- but with ifdefs guarding the qt 5 build where appropriate. Also note that there's no need for QList/QVector changes in QGIS, upstream didn't break those.
@3nids Do we stay with PyQt/sip (sip6 is coming) or are we interested in PySide/Shiboken which is driven by Qt?
That would need to wait till QGIS 4, it would involve complex API breaks and we want to keep the impact here as tiny as possible
QWT could be replaced by QtChart -- but QtChart is GPL3
Yeah.. QWT development is extremely slow. For reference the current version STILL has dual Qt4/Qt5 support in place! I think we should investigate porting away from this wherever it's easy to do so.
Do we stay with PyQt/sip (sip6 is coming) or are we interested in PySide/Shiboken which is driven by Qt?
I will be working on the grant to evaluate Qt for Python next month.
That would need to wait till QGIS 4
If we ask plugin author to use qgis.PyQt, there are good changes that 90-99% of plugins work on both bindings (I guess, we're mainly talking about plugins having direct call to sip). Introducing an option to choose the binding can be done in cmake.
But that's what will be determined by other QEP #163 so we might better discuss this separately.
+1
in details,
Are OS specific dependencies the only reason why supporting version below 5.15? https://doc.qt.io/qt-6/portingguide.html states that using 5.15 to 6 is the easiet to port but won't supporting too many versions of qt potentially cause a lot of IF clauses to ensure support to previous versions?
Another reason why Qt6 is interesting, it's its native graphic APIs support like Vulkan, Metal and Direct3D which will improve QGIS speed, especially in 3D which uses will increase in the coming years.
I'd really like to see QT 6 builds sooner rather than later so that we can start properly testing Apple Silicon arm64. QGIS under Rosetta 2 is not smooth for me on my new MacBook Pro M1 Max. Out of curiosity, I tried an arm64 QGIS 3.10 compilation for Ubuntu running under Parallels and it absolutely flys by comparison to the Rosetta 2 translation.
QGIS Enhancement: Allow Qt 6.x builds of QGIS 3.x
Date 2020/10/08
Author Nyall Dawson (@nyalldawson)
Contact nyall.dawson@gmail.com
Version QGIS 3.X (> 3.16)
Background
Proposed Solution
Following the release of Qt 6.0, we require QGIS 3.18 and above to be buildable and usable under both the Qt 5 and Qt 6 versions. (Qt 5.15 will remain the recommended version for the near future)
We classify this as a "soft break" for plugins -- we do NOT permit any breakage of the existing QGIS 3.x stable api, so the only work required for plugins is to ensure that the are not using the API declared as deprecated in Qt 5.15 and can run correctly under either a Qt 5 or Qt 6 build of QGIS. Based on what it's required so far to remove the deprecation warnings from QGIS itself, this should be minimal work for plugin authors. It is the plugin author's choice whether they want to update their plugins to include Qt 6 support (with the understanding that some users of QGIS 3.x will not be able to use their plugins if they do not update!!).
We make a concentrated effort prior to the release of Qt 6.0 later this year to clear all the remaining deprecation warnings from QGIS, so that we're ready to switch as soon as possible. Currently we can build without deprecation warnings on Qt 5.14, and the remaining effort to build cleanly on 5.15 without warnings should be achievable in this time frame.
We provide a summary guide for plugin authors to advise them of the steps required to upgrade the deprecated Qt 5 API calls
This proposal should minimize harm to plugin authors, while still permitting us to stay current with upstream Qt releases. We'll be able to continue the current focus of upstreaming fixes and features to Qt itself, and also will be fully prepared to start building QGIS for the new Apple architecture (as soon as Qt 6.x and all our other dependencies are available for the Apple CPU, that is!)
Further considerations
While QGIS itself will theoretically be buildable on Qt 6 as soon as all deprecation warnings are cleared from 5.15 builds, we are also dependent on some 3rd party libraries releasing Qt 6 compatible versions.
Specifically, these are:
Affected Files
all