Questions About Qt Version Compatibility
-
At my company we are considering Qt for long term development so we need to analyze the way Qt handles newer releases. I'm reading the wiki page regarding QT version compatibility at https://wiki.qt.io/Qt-Version-Compatibility, and I'd like to confirm with concrete examples if my understanding is correct. I'm restricting myself to deploying Qt applications as a single binary file without any attached runtime (not source), compiled with Qt Creator.
- Major releases may break backwards binary and source compatibility.
If backwards compatibility is broken, then:
- A Qt5 app will not run in a system with a Qt6 runtime (when Qt6 is released).
- Forward compatibility will also be broken, i.e. a Qt6 app will not run in a system with a Qt5 runtime.
If backwards compatibility is not broken, then:
- A Qt5 app will run in a system with a Qt6 runtime.
- Is forward compatibility also ok?: Will a Qt6.x app also run in a system with a Qt5 runtime?
BTW, I understand a Qt4 app doesn't run in a system with a Qt5 runtime, and viceversa: Is this right?
- Minor releases are backwards binary and source compatible.
- A Qt5.5 app will run in a system with a Qt5.7 runtime.
- Is forward compatibility also ok?: Will a Qt5.7 app also run in a system with a Qt5.5 runtime?
- Patch releases are both backwards and forwards binary and source compatible.
- A Qt5.7 app will run in a system with a Qt5.7.1 runtime.
- A Qt5.7.1 app will run in a system with a Qt5.7 runtime.
Any insight you can provide on this matter would be most appreciated.
Thank you.
-
@Rafo this one is best asked on the Interest mailing list http://lists.qt-project.org/mailman/listinfo/interest
There are developers of Qt hanging out there, and they know this by heart.My limited understanding is that in practice Major releases will always break compatibility. And mixing Qt4 and Qt5 binaries and libraries does not work.
Minor versions promise backward compatibility, but not forward compatibility. So to be sure in your example the Qt 5.7 app needs to be recompiled against Qt 5.5 libraries (I can't see the scenario for this. but I believe it exists).
And patch releases just work with each other.
-
@Rafo said in Questions About Qt Version Compatibility:
Is forward compatibility also ok?: Will a Qt6.x app also run in a system with a Qt5 runtime?
no
@Rafo said in Questions About Qt Version Compatibility:
Is forward compatibility also ok?: Will a Qt6.x app also run in a system with a Qt5 runtime?
no
forward compatibility is always a problem, since you do not know if the requirements change, or other features are interfering in the future, etc.
But whats exactly is your problem?
With backward compatibility guaranteed, your software just has to advertise a minimum required Qt version and you are good to go. -
@tekojo
Thank you. I will update the question with the answers I got and post it to the mailing list.Forward compatibility for minor version releases is not promised then. In my tests I'm getting simple Qt apps up to version 5.5 working with older Qt5.x runtimes, but Qt5.6/5.7 apps won't work with any older versions.
Thanks.
-
Thanks. So I get that while it might work some times, forward compatibility is not guaranteed.
@raven-worx said in Questions About Qt Version Compatibility:
But whats exactly is your problem?
With backward compatibility guaranteed, your software just has to advertise a minimum required Qt version and you are good to go.I need to focus on the long term and foresee scenarios our customer or our own development might lead us to.
Here is a concrete example: We support Ubuntu LTS releases, with the current one having Qt5.5 by default (as package):- In two years a customer could upgrade to the next LTS release which might have a newer Qt version, say Qt5.9 or even Qt6.x
- Will our Qt5.5 apps work OK with Qt5.9 ? --> I'd say yes, guaranteed.
- And what if the new LTS release has Qt6.x: will our Qt5.5 apps work OK with Qt6.x? --> I'd say "not guaranteed".
- Conversely, the customers keeps the current LTS release but we (developers) upgrade to a new release having a newer Qt version: say Qt5.9 or Qt6.x:
- Will our Qt5.9 apps still work with Qt5.5? --> I'd say no
- Will our Qt6.x apps still work with Qt5.5? --> I'd say no
Of course the code base would still be aligned to Qt5.5.
I'm I right? I hope I'm not overthinking / stretching these scenarios too much.
Thank you very much for any input.