Supporting Qt 6 - What's needed?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Supporting Qt 6 - What's needed?
For a bit of fun, and figuring that if I am going to learn stuff it might as well be good future stuff ...
I am attempting build with Qt6.31, Pyside6, Shiboken6, Python3.10, C++20.
Seems like a reasonable goal!!
Of course I'm hitting bumps all over the place. Anyone wanna talk about it? (very quiet here lately)
VTK is not python3.10, but close.
Bunch of deprecations in Qt6 which are used quite a bit in FC
I am attempting build with Qt6.31, Pyside6, Shiboken6, Python3.10, C++20.
Seems like a reasonable goal!!
Of course I'm hitting bumps all over the place. Anyone wanna talk about it? (very quiet here lately)
VTK is not python3.10, but close.
Bunch of deprecations in Qt6 which are used quite a bit in FC
Re: Supporting Qt 6 - What's needed?
Are you using the Clazy-Qt6 checks? That would be an easy place to start -- I mean, it's going to mean a lot of code, but conceptually anyway it's not difficult, we just have to make sure to continue to support Qt 5.9, so lots of preprocessor directives in C++, and probably hasattr in Python (at least, that's how I've handled the QRegExp/QRegularExpression stuff).
We can start committing this stuff anytime, since we aren't removing support for older Qt versions, just adding support for the new one, and it doesn't have to happen all at once. Once we have enough we'll turn on the Clazy-Qt6 stuff in our own CI.
We can start committing this stuff anytime, since we aren't removing support for older Qt versions, just adding support for the new one, and it doesn't have to happen all at once. Once we have enough we'll turn on the Clazy-Qt6 stuff in our own CI.
Re: Supporting Qt 6 - What's needed?
For how long?make sure to continue to support Qt 5.9
Is this the accepted plan, or your thoughts?
That would be horrible!so lots of preprocessor directives in C++
Twice, and duplicated the code.how I've handled the QRegExp/QRegularExpression stuff
Have you looked at Qt6 Core5Compat?
Re: Supporting Qt 6 - What's needed?
Until Ubuntu 18.04 LTS end of life (so something like six months from now) as I recall. We discussed this when we were releasing 0.20, but maybe @wmayer would care to weigh in. It would make life a lot easier if we could advance that (since I think it's unlikely that 1.0 will be ready before 18.04 is EOL).
Yes, having to support two versions of Qt is ugly, but there isn't a way around it. Even if we were to advance all the way to 5.15 as the minimum (and I think 5.12 is more likely) I believe there are still some things that will have to be conditionally compiled in C++. As far as I'm concerned the situation in Python is even worse, because it's not as well documented, and PySide6 does things like drop support for the Qt resource system entirely.That would be horrible!so lots of preprocessor directives in C++
Right -- if I have to do it a third time I guess I'll get around to refactoring .Twice, and duplicated the code.how I've handled the QRegExp/QRegularExpression stuff
I knew it existed, but I haven't used it for anything.Have you looked at Qt6 Core5Compat?
- adrianinsaval
- Veteran
- Posts: 5548
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Supporting Qt 6 - What's needed?
I see no point in supporting 18.04 in git master, it's not going to be released before it reaches EOL and the daily ppa is broken anyways. Plus nowadays the rare users of it can resort to appimage/snap/flatpak/conda
Re: Supporting Qt 6 - What's needed?
Code: Select all
PySide6 does things like drop support for the Qt resource system entirely.
- adrianinsaval
- Veteran
- Posts: 5548
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Supporting Qt 6 - What's needed?
I don't know if this was an issue for pyside too but note that the stackoverflow question and answer are about pyqt, FreeCAD uses pyside, not pyqt
Re: Supporting Qt 6 - What's needed?
Oops. Thanks for pointing that out! Back to Mr Google ..adrianinsaval wrote: ↑Tue Sep 27, 2022 3:58 pm I don't know if this was an issue for pyside too but note that the stackoverflow question and answer are about pyqt, FreeCAD uses pyside, not pyqt
Re: Supporting Qt 6 - What's needed?
In my searching I'm not seeing an issue. Could someone expand on this a bit?PySide6 does things like drop support for the Qt resource system entirely
Re: Supporting Qt 6 - What's needed?
Sure, I can upgrade to Ubuntu 20.04 but this will take me some time to do that.Until Ubuntu 18.04 LTS end of life (so something like six months from now) as I recall. We discussed this when we were releasing 0.20, but maybe @wmayer would care to weigh in. It would make life a lot easier if we could advance that (since I think it's unlikely that 1.0 will be ready before 18.04 is EOL).
That is a fact we always have to deal with independent if the lowest Qt version is 5.9 or 5.12 because between two Qt versions there is always an API change. And if we support Qt5 and Qt6 then there will be even more #ifdef's. To reduce them in our code base we can implement some convenience functions. AFAIK in Qt 5.15 all classes or functions are marked deprecated that will be removed in Qt6 and therefore a couple of convenience functions have been implemented e.g. Base/Mutex.h, Base/QtTools, Gui/Tools.h, ...Yes, having to support two versions of Qt is ugly, but there isn't a way around it.
Is there a reason for it? And what about Qt itself? Or is it rather that the Qt tools can be directly used for Python code?and PySide6 does things like drop support for the Qt resource system entirely.
The question is how useful it is. I remember that for the move from Qt3 to Qt4 there also was a support library but its main purpose was that you didn't get compile errors but functionality-wise pretty much everything was broken. So, there was no alternative than fully porting to Qt4 as soon as possible.Have you looked at Qt6 Core5Compat?