Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't run on Qt 5.6 in Windows (missing QtWebKit) #26

Open
marczellm opened this issue Apr 11, 2016 · 7 comments
Open

Doesn't run on Qt 5.6 in Windows (missing QtWebKit) #26

marczellm opened this issue Apr 11, 2016 · 7 comments

Comments

@marczellm
Copy link

Traceback (most recent call last):
  File "D:\Python35\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "D:\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Python35\lib\site-packages\qhangups\__main__.py", line 24, in <module
>
    from qhangups.conversations import QHangupsConversations
  File "D:\Python35\lib\site-packages\qhangups\conversations.py", line 3, in <mo
dule>
    from qhangups.conversationwidget import QHangupsConversationWidget
  File "D:\Python35\lib\site-packages\qhangups\conversationwidget.py", line 3, i
n <module>
    from PyQt5 import QtCore, QtGui, QtWidgets, QtWebKitWidgets
ImportError: cannot import name 'QtWebKitWidgets'

QtWebKit was removed from Qt 5.6.

@xmikos
Copy link
Owner

xmikos commented Apr 15, 2016

QtWebKit in Qt 5.6 can still be installed, it is just not included in standard Qt distribution anymore. E.g. in Arch Linux you can install qt5-webkit package.

I can switch to QtWebEngine, but QtWebEngine is much more resource intensive (it eats a lot more memory), which is really not good for simple usecase like displaying messages in IM client :-/

@marczellm
Copy link
Author

I'm on Windows where installation / compilation of separate binaries is more complicated. Maybe I'll fork QHangups for my own purpose and try QtWebEngine.

@xmikos
Copy link
Owner

xmikos commented Apr 17, 2016

If you try it with QtWebEngine and it will work without problems, I can merge it back, just do a pull request. I will have to try it myself, because QtWebKit clearly wouldn't be there forever (I just don't have time to do it right now).

@marczellm
Copy link
Author

I tried QtWebEngine, but it dropped a lot of APIs including DOM manipulation (I found no clear source on this, but it only seems possible through injected JavaScript), so the migration is nontrivial.

@thecodrr
Copy link

I ran this: sudo apt-get install python3-pyqt5.qtwebkit in terminal and now everything works perfectly.

@marczellm
Copy link
Author

Unfortunately I cannot do that on Windows.

But I created a pull request with the necessary changes to migrate to QtWebEngine. Unfortunately some APIs were removed, like scrolling or resizing signals.

@xmikos xmikos changed the title Doesn't run on Qt 5.6 Doesn't run on Qt 5.6 in Windows (missing QtWebKit) Oct 17, 2016
@pranav-prakash
Copy link

It might be possible on windows to compile Qt with support for QtWebKit. At least on osx from homebrew there is a flag to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants