Supporting Qt 6 - What's needed?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Post Reply
User avatar
chennes
Veteran
Posts: 2240
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Supporting Qt 6 - What's needed?

Post by chennes »

In previous discussions (e.g. this one) it was pointed out that we couldn't really consider adding support for Qt6 until version 6.2 was released, with its inclusion of QtWebEngine (needed for Start). So, 6.2 is now available, and the Qt Company claims that basically everything that was in 5.15 is now in 6. Technologically speaking, it appears that the path is clear for us to start adding support. Has anyone begun the process of looking into what changes we will need to make? Are there other sticking points to be aware of?
Chris Hennes
Pioneer Library System
openBrain
Veteran
Posts: 7993
Joined: Fri Nov 09, 2018 5:38 pm

Re: Supporting Qt 6 - What's needed?

Post by openBrain »

First thing to look at is licensing.
Then if it's OK, I guess it's straight forward to have a test build with Qt 6.
Then if we plan to totally move to it, we have to have some spare time as from around 6.5, Qt will probably start announcing future obsolete API and that's always good to not wait too much to fix this.
Finally before moving, we probably have to evaluate changes on PySide that will likely break the Python part (official and addons). This is IMO the biggest uncertainty along behavior of OpenGL code.

Did you check? https://doc.qt.io/qt-6/portingguide.html
User avatar
doia
Posts: 199
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: Supporting Qt 6 - What's needed?

Post by doia »

I think we would need an official 0.20 release first, as QT5 was the default from this version on. v0.19 used QT4 by default (see the docs https://wiki.freecadweb.org/Compile_on_Linux)

v0.19 -> Python2 and QT4
v0.20 -> Python3 and QT5
v0.21 -> Python3 and QT6

Or there is a deliberate project decision to jump from default v0.19/Py2/QT4 directly to v0.20/PY3/QT6 with the version change and skip QT5 with official release versions.
adrianinsaval
Veteran
Posts: 3168
Joined: Thu Apr 05, 2018 5:15 pm

Re: Supporting Qt 6 - What's needed?

Post by adrianinsaval »

What would be wrong about going directly from qt4 to qt6? FreeCAD's release schedule has no relation with qt's. Also, does working to support qt6 mean we need to drop support for qt5? I don't think that's the case.
User avatar
chennes
Veteran
Posts: 2240
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Supporting Qt 6 - What's needed?

Post by chennes »

adrianinsaval wrote: Fri Jan 07, 2022 12:28 pm Also, does working to support qt6 mean we need to drop support for qt5? I don't think that's the case.
Absolutely not -- just as we supported both Qt4 and Qt5 simultaneously, I think we'll support Qt5 and Qt6 simultaneously for some time. Qt6.2 and Qt5.15 are very similar in terms of feature availability and structure, so we may be able to support Qt 5.15 for a long time.

The Qt 6 open source license is LGPL3. To my knowledge we don't make custom modifications to Qt itself as part of our distribution, and we always link to Qt as a shared library. My understanding of the LGPL is that we can link to it without problems, and without it affecting our own choice of license.
Chris Hennes
Pioneer Library System
adrianinsaval
Veteran
Posts: 3168
Joined: Thu Apr 05, 2018 5:15 pm

Re: Supporting Qt 6 - What's needed?

Post by adrianinsaval »

It's the same license than qt5 so if there is any issue using qt6, then we are already making a violation with qt5 :lol: but obviously I don't think there is any
User avatar
chennes
Veteran
Posts: 2240
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Supporting Qt 6 - What's needed?

Post by chennes »

I think the one change is that they will no longer have LTS versions for open source, LTS is only for their commercial customers. Since we've never pegged to an LTS version, I don't think that will affect us (except insofar as it affects what Linux distros decide to do, of course). Are any distros including Qt6 yet?
Chris Hennes
Pioneer Library System
adrianinsaval
Veteran
Posts: 3168
Joined: Thu Apr 05, 2018 5:15 pm

Re: Supporting Qt 6 - What's needed?

Post by adrianinsaval »

arch and it's derivatives as expected: https://archlinux.org/packages/extra/x86_64/qt6-base
but anything that isn't rolling will likely suffer without the point releases
User avatar
onekk
Veteran
Posts: 2801
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Supporting Qt 6 - What's needed?

Post by onekk »

My thinking is "newer is not everytime better".

So if there are no new "functions" or more bug fixes and OS compatibility improvements, targeting to QT6 is at least premature.

Not counting that many people are using Debian derivative, where "bleeding edge libraries" are not the "normal way" of putting in the OS.

Not speaking about Red Hat derivatives, that use even more "old" libraries.

Better to concentrate on other things, like "fixing bugs" and "extend functionalities" as Qt is dealing with "interface only", and maybe using more version will be "more work" for developers.

PySide2 is used, but is exposed with old Pyside1 interface, so

But if there are great improvements in "rendering speed" with new Qt6 maybe a "more quick" adoption would be a "real advancement".

Side note, I'm using Arch derivative, but I use AppImage, so no problem on my side, different thing would be if many distributions will adopt Qt6 as "standard Qt version".

Regards

Carlo D.
My English and Italian Scripting Guide https://github.com/onekk/freecad-doc.
My Blog: https://onekk-maker.blogspot.com/

To help development see on GitHub Page

For enquiry about customized FC Scripting job PM me.
User avatar
Kunda1
Veteran
Posts: 12726
Joined: Thu Jan 05, 2017 9:03 pm

Re: Supporting Qt 6 - What's needed?

Post by Kunda1 »

chennes wrote: Fri Jan 07, 2022 2:17 pm Are any distros including Qt6 yet?
Per repology:

Image
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Post Reply