qhangups
qhangups copied to clipboard
Migrate to QWebEngine
Works on my machine, but needs more testing. Scrolling and resizing detection removed, not available with QWebEngine.
You can edit .ui files in Designer
(part of Qt distribution, or part of PyQt installation on Windows).
Btw. I have tried it with QWebEngine and the result is really awful (too much resource intensive - both RAM and CPU). So I am not considering switch to QWebEngine for now, but QHangups can support both (with QtWebKit used by default if available).
Things that has to be done before merging:
- make use of QWebEngine optional (by runtime command line option / settings in app).
- fix scrolling / resizing with QWebEngine
- use QWebEngine's
runJavaScript()
to manipulate DOM instead of BeautifulSoup (regenerating HTML and rendering whole page again after every new message is really bad)
It can be done, but I don't have resources (time) to do it myself in near future. But thanks for your preliminary work, it could be useful in future.
runtime command line option / settings in app
or figure out a way to catch the ImportError and then fall back to QWebEngine?
That's not a problem, this should be default (if QtWebKit is unavailable, fall back to QWebEngine). But user who has QtWebKit installed should still have option to start QHangups with QWebEngine (at least for testing purposes).
Btw. scrolling can be implemented with runJavaScript()
too. See e.g. this as an example: QtWebEngineWebWidget.cpp
It seems that whole on_contents_size_changed()
(and related scroll_messages()
) methods would have to be reimplemented in JavaScript.