Supporting Qt5

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!
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Supporting Qt5

Post by m42kus »

Kunda1 wrote: @m42kus thanks so much for testing!
Do you mind sharing the build script that you used to test this build ?
Sorry, at the time I was only trying out stuff in the command line and didn't have anything to share.

However I did some packaging work over the weekend (for arch linux). Because PySide2 doesn't support Qt>=5.7 jet, I was forced to create a Qt5.6 package. I haven't uploaded the packages to the AUR jet, but interrested testers can check them out on github. If there aren't any big issues left I'm going to upload them to the AUR in a week or so (didn't have the time to thoroughly test all the packages jet). If you encounter/find problems concerning the PKGBUILD's pls pm me before posting (don't want to hijack this thread ;)).

The PySide2 package is not jet complete. I disabled QWebEngine stuff because it broke the build for me and isn't used by FreeCAD atm. A fix for that would be awesome :).

Packages on github: Edit: The freecad-qt5-git package doesn't conflict with freecad, freecad-git or freecad-netgen-git. The launcher is called FreeCAD-Qt5, the binaries FreeCAD-Qt5, FreeCADCmd-Qt5, freecad-qt5 and freecadcmd-qt5.
My GSoC Devlog: ceeli.github.io/gsoc
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Supporting Qt5

Post by m42kus »

m42kus wrote: However I did some packaging work over the weekend (for arch linux). Because PySide2 doesn't support Qt>=5.7 jet, I was forced to create a Qt5.6 package. I haven't uploaded the packages to the AUR jet, but interrested testers can check them out on github. If there aren't any big issues left I'm going to upload them to the AUR in a week or so (didn't have the time to thoroughly test all the packages jet). If you encounter/find problems concerning the PKGBUILD's pls pm me before posting (don't want to hijack this thread ;)).

The PySide2 package is not jet complete. I disabled QWebEngine stuff because it broke the build for me and isn't used by FreeCAD atm. A fix for that would be awesome :).
It seems like the QWebEngine related bug was resolved upstream (or I did something different this time, don't know...). However I uploaded the packages to the AUR this morning. The freecad package name hasn't changed (freecad-qt5-git). As soon as pyside2 is avaliable in the official repositories I plan to remove the package and migrate the freecad-git package to qt5.
My GSoC Devlog: ceeli.github.io/gsoc
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Supporting Qt5

Post by Kunda1 »

m42kus wrote: It seems like the QWebEngine related bug was resolved upstream (or I did something different this time, don't know...). However I uploaded the packages to the AUR this morning. The freecad package name hasn't changed (freecad-qt5-git). As soon as pyside2 is avaliable in the official repositories I plan to remove the package and migrate the freecad-git package to qt5.
Great news @m42kus !
Quick off-topic question: what are the odds of using OCC7.1 (https://aur.archlinux.org/packages/opencascade7)?
Thanks for your work on this.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Supporting Qt5

Post by m42kus »

Kunda1 wrote:
m42kus wrote: It seems like the QWebEngine related bug was resolved upstream (or I did something different this time, don't know...). However I uploaded the packages to the AUR this morning. The freecad package name hasn't changed (freecad-qt5-git). As soon as pyside2 is avaliable in the official repositories I plan to remove the package and migrate the freecad-git package to qt5.
Great news @m42kus !
Quick off-topic question: what are the odds of using OCC7.1 (https://aur.archlinux.org/packages/opencascade7)?
Thanks for your work on this.
Well, at this point I'm not sure what PKGBUILDs I should maintain on the AUR. I have quite a few PKGBUILDs that I use personally, but I don't know which combination of build-time options would be most useful to you and other users and I don't want to maintain all of them :P One possibility would be to have two packages: freecad-git which doesn't require the user to wait 5+ hours to compile because of all the dependencies in the AUR and freecad-qt5-opencascade7-<whatever>-git that uses all the latest exciting stuff (that package could than also be customised quite easily to exclude certain "features").

Edit: I didn't really follow the opencascade7 exclusive development, are there stability issues? And how useful are the features? Maybe it woudn't be such a bad idear to build both, freecad-git and freecad-qt5-git, against it.
My GSoC Devlog: ceeli.github.io/gsoc
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Supporting Qt5

Post by Kunda1 »

BTW, any commits that are related to porting from Qt4 to Qt5 please link them to issue #2986
In the commit message you can write

Code: Select all

issue #2968
in order to auto-link it in MantisBT. See https://freecadweb.org/wiki/tracker#Att ... o_a_ticket
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
sheinz
Posts: 12
Joined: Wed May 31, 2017 2:00 pm

Re: Supporting Qt5

Post by sheinz »

Hi!

Thank you guys for all the efforts you are putting into FreeCAD!

I've managed to install FreeCAD 0.17 with Qt 5.6 for Arch linux but I have some errors with Draft workbench.

Code: Select all

During initialization the error No module named QtCore occurred in /opt/freecad-qt5/Mod/Ship/InitGui.py
Please look into the log file for further informationDuring initialization the error cannot import name QtCore occurred in /opt/freecad-qt5/Mod/Draft/InitGui.py
Please look into the log file for further informationDuring initialization the error cannot import name QtCore occurred in /opt/freecad-qt5/Mod/Tux/InitGui.py
Please look into the log file for further informationDuring initialization the error No module named QtCore occurred in /opt/freecad-qt5/Mod/Plot/InitGui.py
Please look into the log file for further informationDuring initialization the error cannot import name QtCore occurred in /opt/freecad-qt5/Mod/Arch/InitGui.py
Please look into the log file for further informationWizard shaft module cannot be loaded
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/freecad-qt5/Mod/Part/AttachmentEditor/Commands.py", line 27, in <module>
    from PySide import QtCore
  File "/opt/freecad-qt5/bin/PySide/QtCore.py", line 1, in <module>
    from PySide2.QtCore import *
<type 'exceptions.ImportError'>: No module named QtCore
Involute gear module cannot be loaded
Unknown command 'PartDesign_InvoluteGear'
Am I missing something?

BTW I also successfully compiled FreeCAD with current QT5.8 in Arch but it gives me segmentation fault right at start...
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Supporting Qt5

Post by Jee-Bee »

I'm not realy into this topic... But as far as know. you need to compile with qt<5.6 because of pyside see https://wiki.qt.io/PySide2.
I'm not sure if everything is ported to Qt5 the 0.17_pre still uses Qt4.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Supporting Qt5

Post by wmayer »

You have to install the module PySide2. But I don't think that any distribution has this in their repos. So, you probably have to build from sources.
sheinz
Posts: 12
Joined: Wed May 31, 2017 2:00 pm

Re: Supporting Qt5

Post by sheinz »

I installed PySide2. Without PySide2 FreeCAD will not compile.
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Supporting Qt5

Post by m42kus »

Hi everyone,
I updated the freecad-qt5-git package on arch linux. Now it should work again ;) It uses Qt5.9 from the official repositories. Before updating make sure the latest pyside2-git, shiboken2-git and pyside2-tools-git packages are used.
My GSoC Devlog: ceeli.github.io/gsoc
Post Reply