pythonqt icon indicating copy to clipboard operation
pythonqt copied to clipboard

Please remove the dependency on QWebKit because it is deprecated

Open yurivict opened this issue 3 years ago • 8 comments

pythonqt-3.4.2 has dependency on QWebKit:

$ grep -ri webkit work/pythonqt-3.4.2/
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp:#ifdef PYTHONQT_WITH_WEBKIT
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp:void PythonQt_init_QtWebKit(PyObject*);
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp:#ifdef PYTHONQT_WITH_WEBKIT
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp:    PythonQt_init_QtWebKit(0);
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.pro:  qtHaveModule(webkit):CONFIG += PythonQtWebKit
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.pro:PythonQtWebKit {
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.pro:  DEFINES += PYTHONQT_WITH_WEBKIT
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.pro:  Xinclude (com_trolltech_qt_webkit)
work/pythonqt-3.4.2/extensions/PythonQt_QtAll/PythonQt_QtAll.pro:  QT += webkit webkitwidgets

QWebEngine is a replacement.

Thanks! Yuri

yurivict avatar Nov 02 '23 20:11 yurivict

It is true that WebKit is deprecated, nethertheless it is still maintained (outside of Qt), and at least some people rely on it. The define PYTHONQT_WITH_WEBKIT is there to allow to include/exclude it. To make this better configurable, it could for example be made dependent on an environment variable, but given that you have to build PythonQt yourself anyway, you could just remove that define in your build environment.

mrbean-bremen avatar Nov 02 '23 20:11 mrbean-bremen

There are also qmake arguments, you can add an argument DISABLE_WEBKIT=yes. This would be better than patching.

yurivict avatar Nov 02 '23 20:11 yurivict

you can add an argument DISABLE_WEBKIT=yes.

True. Do you want to make a PR?

mrbean-bremen avatar Nov 02 '23 20:11 mrbean-bremen

Sorry, I don't have resources for PRs. I am only a port maintainer.


On a side note: QWebEngine doesn't seem to be supported in pythonqt.

yurivict avatar Nov 02 '23 20:11 yurivict

No problem, it just means that it may take some time.

As for WebEngine - @usiems, do you want to comment?

mrbean-bremen avatar Nov 02 '23 20:11 mrbean-bremen

Thanks @mrbean-bremen . Indeed, we are users of QtWebKit as it has features still not yet implemented in its "replacement" QtWebEngine. QtWebKit is maintained by the original developer but outside the Qt company. This third-party QtWebKit ships with RHEL 7/8/9 and Ubuntu 20.04/22.04 which uses Qt after 5.6 after which it was removed.

It would actually be great that any pre-created files from the generator would actually ship with QtWebKit stuff. We are currently still using 5.6 generator files with Qt 5.12/5.15 as that directory has QtWebKit files.

And on a somewhat related note to what goes on elsewhere here with the generator. It's good to see Qt 5 support still honored. Given that RHEL 9 ships with Qt 5.15, we are many production users which will be on Qt 5.15 until at least 2032.

he-hesce avatar Nov 03 '23 03:11 he-hesce

On a side note: QWebEngine doesn't seem to be supported in pythonqt.

There is a typesystem_webenginewidgets.xml file (which also contains the QtWebEngine classes) in the generator now, but it seems the generated sources were never updated in the repository. We have generated the wrappers for MeVisLab.

usiems avatar Nov 03 '23 12:11 usiems

There is currently an ongoing effort to recreate the wrappers (see #140), so this probably be remediated soon.

mrbean-bremen avatar Nov 03 '23 13:11 mrbean-bremen