Removing dependency on QtWebKit

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!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Removing dependency on QtWebKit

Post by triplus »

(Mod note: split from CompileOnUnix is deprecated - FreeCAD can't be installed on Gentoo)

QtWebKit to QtWebEngine porting effort would need to happen. If we will decide to go down that path. AFAIK things like FreeCAD binaries will gain in size ... Until then likely the only solution is to disable FreeCAD modules using QtWebKit when compiling.

P.S. That is if Gentoo really (is about to) removed QtWebKit. True QtWebKit isn't a part of Qt source/binary from Qt 5.6 anymore. But it was still possible to compile it separately. And Linux distributions in general did/do that. Gentoo therefore won't do that anymore? Or is the real problem anything Qt 4 related will get removed and FreeCAD is still compiled against Qt 4? That is a different thing and can be resolved by enabling Qt 5 when building. As port to Qt 5 was already achieved. But PySide 2 is needed when compiling against Qt 5. Does Gentoo already provide PySide 2?
Last edited by triplus on Thu Feb 08, 2018 10:40 pm, edited 1 time in total.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: CompileOnUnix is deprecated - FreeCAD can't be installed on Gentoo

Post by ian.rees »

NormandC wrote: Sun Feb 04, 2018 10:35 am People have been able to compile with Qt5 (the Mac OS X builds are based on it)
Yes, but the QtWebKit issue is a pain, and is one of our current sticking points with getting past Qt5.6. Qt5.10 is the current default in Homebrew on MacOS.
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: CompileOnUnix is deprecated - FreeCAD can't be installed on Gentoo

Post by yorik »

Off-topic - Maybe we could try, after the release, to make a new simplified start WB that doesn't depend on HTML/web stuff (I think it possible to get cool results with qt widgets only). The web workbench itself is small, maybe a simple python script could do the job as well too. So that would fully remove webkit/engine dependency from FreeCAD. Not sure it's an interesting path or not, but might be worth looking at it.
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: CompileOnUnix is deprecated - FreeCAD can't be installed on Gentoo

Post by kkremitzki »

yorik wrote: Fri Feb 09, 2018 9:30 am Off-topic - Maybe we could try, after the release, to make a new simplified start WB that doesn't depend on HTML/web stuff (I think it possible to get cool results with qt widgets only). The web workbench itself is small, maybe a simple python script could do the job as well too. So that would fully remove webkit/engine dependency from FreeCAD. Not sure it's an interesting path or not, but might be worth looking at it.
+1
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: CompileOnUnix is deprecated - FreeCAD can't be installed on Gentoo

Post by Kunda1 »

yorik wrote: Fri Feb 09, 2018 9:30 am Off-topic - Maybe we could try, after the release, to make a new simplified start WB that doesn't depend on HTML/web stuff (I think it possible to get cool results with qt widgets only). The web workbench itself is small, maybe a simple python script could do the job as well too. So that would fully remove webkit/engine dependency from FreeCAD. Not sure it's an interesting path or not, but might be worth looking at it.
+1
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
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Removing dependency on QtWebKit

Post by triplus »

Removing "web component" from FreeCAD completely is i guess over doing it. At least at this point. Thinking about it we won't be removing QtWebEngine from Qt ourself? Therefore porting Start/Web workbenches shouldn't be that big of a deal. More or less switching from Safari to Chrome. ;)

P.S. On a more serious note Qt4WebKit and Qt 4 software in general is more or less getting removed from (upcoming) Linux distribution repositories. FreeCAD is currently located on Debian list too:
freecad 874877 -> see qt4webkit removal page
https://wiki.debian.org/Qt4Removal
Basically we are about to get the last Qt4 point release and upstream is
migrating from WebKit to Blink in the Qt5 series, so we won't have much upstreams
support for maintaining Qt4's WebKit (Qt5's WebKit is expected to stay supported
until Qt6).

In order to make this move, all packages directly or indirectly depending on
the Qt4's WebKit library have to either get ported to Qt5 or eventually get
removed from the Debian repositories.
https://wiki.debian.org/Qt4WebKitRemoval

P.S. And from FreeCAD perspective another issue is PySide 2 not being available in Debian (and other distributions) repositories ATM.
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Removing dependency on QtWebKit

Post by wmayer »

I agree with triplus that there is no need now to remove the whole web stuff. Moving to Qt's QtWebEngine(Widget) module shouldn't be that hard, I guess.

This was the one and only thing that I didn't port to Qt5 when doing the migration because on Windows when creating the QtWebEngine binaries the build process always stopped with an error. And on Ubuntu 14.04 even the Qt5 package still depends on webkit. So, I don't have the needed Qt module in order to finish the last migration step.
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Re: Removing dependency on QtWebKit

Post by mumme »

Hi!

I found some time during christmas/new year holidays to code. :D

I ported FreeCAD to QWebEngine instead of QWebkit. If you're interested its located here.
https://github.com/mumme74/FreeCAD/tree/qwebengine

Currently tested with qt5.12.0 on mac and on windows 10
Seems to work ok for me, but could probably use some more testing.

Regards
Fredrik Johansson
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Removing dependency on QtWebKit

Post by triplus »

Interesting.

I guess best if we target this for FreeCAD 0.19 development cycle? To better understand all the pros and cons. Like what happens to FreeCAD binaries in relation to the size. Deciding if we still want to support "web functionality" on Qt4 builds or not and for how long ...
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Re: Removing dependency on QtWebKit

Post by mumme »

triplus wrote: Wed Jan 09, 2019 5:19 pm Interesting.

I guess best if we target this for FreeCAD 0.19 development cycle? To better understand all the pros and cons. Like what happens to FreeCAD binaries in relation to the size. Deciding if we still wan't to support "web functionality" on Qt4 builds or not ...

Of course..
It does however retain support for QWebKit, it is selectable through a CMAKE option.
Configure defaults to QWebKit if Qt is below Qt5.7
Post Reply