-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ENH] Add support for PyQt5 #1171
Conversation
def __init__(self, name, bases, attr_dict): | ||
pyqtWrapperType.__init__(self, name, bases, attr_dict) | ||
_QObjectType.__init__(self, name, bases, attr_dict) | ||
abc.ABCMeta.__init__(self, name, bases, attr_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what does this metaclass do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.python.org/3.5/library/abc.html#abc.ABCMeta
It is the metaclass of the python's 'abstract' containers (collections.Mapping
, collection.Sequence
, ...), and needed here in order to properly subclass QObject and MutableMapping later on.
Current coverage is 89.39% (diff: 100%)@@ master #1171 diff @@
==========================================
Files 79 79
Lines 8593 8603 +10
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 7681 7691 +10
Misses 912 912
Partials 0 0
|
@@ -0,0 +1,122 @@ | |||
import textwrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not replace Orange/widgets/webview.py with this module, and have an additional WebView class that extends one or the other?
8714a83
to
ef9bc4f
Compare
41a7b2f
to
7bfedcb
Compare
I would like to merge this PR and start providing nightly builds that use PyQt5. Could you rebase onto the latest master (for the final time)? |
104d59c
to
1a9deaf
Compare
@@ -163,6 +169,9 @@ def main(argv=None): | |||
|
|||
qt_argv += args | |||
|
|||
# Add --disable-web-security to enable Qt WebEngine to load local resources | |||
qt_argv.append('--disable-web-security') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kernc Why is this necessary?
Qt WebEngine can (or at least should be able to) load local resources for locally originating content. At lest that is what the documentation for QWebEnginePage says:
... By default, local schemes like file:// and qrc:// are considered to be in the same security origin, and can access each other's resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that appears to not have been needed, thanks.
Explicitly create an empty default QMenuBar for global menu bar on OSX
Set/update the widget sizes in the splitter only when the splitter is visible and has correct geometry.
Were unused and wrong in implementation
Implement two WebView utility classes based on QtWebKit and QtWebEngine (where available) that automatically setup a simple 'bridge' interface for communication with Java Script engine.
…lassmethod Doesn't want to connect otherwise on PyQt 5.7 on Linux. QObject::connect: Cannot connect ExceptHook::handledException(PyQt_PyObject) to (null)::handle_exception(PyQt_PyObject) and crashes.
Please give it another rebase just to trigger CI. |
Add full support for PyQt5