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

[ENH] Add support for PyQt5 #1171

Merged
merged 24 commits into from
Oct 21, 2016
Merged

[ENH] Add support for PyQt5 #1171

merged 24 commits into from
Oct 21, 2016

Conversation

ales-erjavec
Copy link
Contributor

Add full support for PyQt5

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@codecov-io
Copy link

codecov-io commented Jun 6, 2016

Current coverage is 89.39% (diff: 100%)

Merging #1171 into master will increase coverage by 0.01%

@@             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          

Sunburst

Powered by Codecov. Last update 9054060...796b0a3

@@ -0,0 +1,122 @@
import textwrap
Copy link
Contributor

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?

@astaric
Copy link
Member

astaric commented Sep 8, 2016

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)?

@@ -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')
Copy link
Contributor Author

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

Copy link
Contributor

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.

…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.
@kernc
Copy link
Contributor

kernc commented Oct 21, 2016

Please give it another rebase just to trigger CI.

@ales-erjavec ales-erjavec changed the title [WIP] Add full support for PyQt5 [ENH] Add support for PyQt5 Oct 21, 2016
@janezd janezd merged commit 7dca993 into biolab:master Oct 21, 2016
@ales-erjavec ales-erjavec deleted the anyqt branch January 27, 2017 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants