removal of Qt4 support

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

removal of Qt4 support

Post by uwestoehr »

I want to stress this topic again, because

- we need more time to take care of what Qt5 features might not be in Qt 4
- Qt4 is not supported for 5 years now. So in fthere are security issues in it, FC builds have them too
- I cannot find a legal nor te4chnical reason why to keep Qt 4 since Qt 5.x versions are available under the same license.

Can we therefore please upgrade our Qt requirement to a Qt 5 LTS version, lets say Qt 5.9.x? If you disagree, I would like to understand why Qt 4 is a benefit for us.

wmayer wrote: .
vocx wrote: .
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: removal of Qt4 support

Post by wmayer »

The only systems that still offer Qt4 packages are Ubuntu Xenial and Bionic (I don't know about the other Linux distributions) but both also offer Qt5 packages.
- I cannot find a legal nor te4chnical reason why to keep Qt 4 since Qt 5.x versions are available under the same license.
The only case where Qt4 currently is still used is one of our travis builds. But for this configuration it's actually more about Py2 support than Qt4 support. Py2 support has officially expired in January 1st 2020 but FreeCAD v0.19 is not released yet and I don't like to drop a library version during development.

So, I don't mind to change the travis configuration to use Qt5 everywhere.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: removal of Qt4 support

Post by vocx »

uwestoehr wrote: Thu Sep 17, 2020 11:26 am ... I would like to understand why Qt 4 is a benefit for us.
The transition to Py3/Qt5 came relatively late to FreeCAD. Release 0.18 was the first one to include proper support for Py3/Qt5. Before that, some developers were testing Py3/Qt5 with v0.17, but most pre-compiled packages were still Py2/Qt4.

Given this, I remember threads over the last two years that mentioned that Py2/Qt4 worked better than Py3/Qt5; the reason for this is probably the different versions of Qt5 available, which ranged from Qt 5.5 to the present Qt 5.15. For example, until recently FreeCAD 0.19 on the Raspberry Pi could only be compiled as Py3/Qt4, and not Py3/Qt5. This is not a problem now as the Pi4 can now install Ubuntu, and there it all seems to work.

So, I am not saying that Py2/Qt4 is necessary in present day. It's just how the software evolved over the years that we have this combination now. I am totally in favor of removing Py2/Qt4 support once v0.19 is released as stable. In my opinion, v0.20 should be Py3/Qt5 only; then it would be wise to use more advanced features of both Python 3 and Qt 5 (which today aren't employed to maintain easy compatibility with Py2/Qt4).

By the way, the situation with Qt6 is still sketchy (C++17 required, no open source LTS version), so that means that we may have to target the latest LTS version of Qt5 for a long time.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: removal of Qt4 support

Post by kkremitzki »

I don't think we would want to rush into using Qt 6.0, either, probably a couple minor version releases before it's worth poking around unless you want the bleeding edge.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: removal of Qt4 support

Post by wmayer »

I don't think we would want to rush into using Qt 6.0, either, probably a couple minor version releases before it's worth poking around unless you want the bleeding edge.
+1

Even the move from Qt4 to Qt5 was done quite late. IIRC when I started the port the available Qt version was 5.6 and one of the reasons to move was that Debian announced to drop all packages that still use Qt4.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: removal of Qt4 support

Post by uwestoehr »

So to summarize, as of now, the only reason to take care of Qt 4 is one of the Travis machines.

But a build-ckecking machine should save us work and not add one. So I vote to upgrade that Travis machine to Qt 5.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: removal of Qt4 support

Post by sgrogan »

I believe that the Xenial(16.04) FreeCAD-daily PPA is still using QT4/PY3 I don't think aanyone could ever make the Xenial QT5 work.
The Travis build is using Xenial libs to build.

I don't think Pyside2 (required for QT5) will link against PY2.
"fight the good fight"
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: removal of Qt4 support

Post by kkremitzki »

That's correct, the Qt 5 in Ubuntu 16.04 is too old for PySide 2 and therefore a Qt 5 + Python 3 build, all that will work are Qt 5 + Python 2 or Qt 4 + Python 3.

However it will be EOL in about 7 months, and there's always the option of distributing via snap as a stopgap.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: removal of Qt4 support

Post by sgrogan »

kkremitzki wrote: Thu Sep 17, 2020 7:02 pm Qt 5 + Python 2
Doesn't Pyside depend on QT4? https://packages.ubuntu.com/xenial/libpyside-dev
"fight the good fight"
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: removal of Qt4 support

Post by openBrain »

uwestoehr wrote: Thu Sep 17, 2020 11:26 am - I cannot find a legal nor te4chnical reason why to keep Qt 4 since Qt 5.x versions are available under the same license.
This isn't true. Even if FreeCAD is probably not the most concerned piece of software, there has been a significant licensing move between Qt 5.6 and Qt 5.7. Reason why many companies designing embedded devices still stick with Qt 5.6. You can read good article for more details.

So probably supporting Qt 5.6 is a sensible choice ATM.
Post Reply