Open
Conversation
development merged to master
Getting support to PyQt5
|
This fails if both PyQt4 and PyQt4 are available bu only > python
Python 2.7.13 (default, Mar 22 2017, 12:31:17) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtCore import *
>>> from PyQt4.QtCore import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class |
Collaborator
|
Additionally, QtWebKit is available for PyQt5, too (however, I don't know if it has been marked as deprecated). I would suggest to use find_spec from importlib to validate the dependencies instead of try..except: (Edit: Sorry, using find_spec would break Python 2.x support) |
Author
|
Yeah! The Problem is the qt developer changed a lot of things on calling some libraries and methods, for example WebPage was changed to WebPageEngine and it messed up everything. |
Collaborator
|
The easiest solution would be to move the import of QtWebEngine into the first line and only support QtWebKit for Qt4 and QtWebEngine for Qt5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
I've made some adjustments to support Qt5.9