-
Notifications
You must be signed in to change notification settings - Fork 0
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
Backend refactor qt #5
base: backend-refactor
Are you sure you want to change the base?
Conversation
@@ -442,6 +464,52 @@ def closeEvent(self, event): | |||
QtWidgets.QMainWindow.closeEvent(self, event) | |||
|
|||
|
|||
class Window(WindowBase, MainWindow): | |||
def __init__(self, title): | |||
WindowBase.__init__(self, title) |
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.
This is going to be subtle to get right because some versions of pyqt do not user super
and some do. This will probably need some conditional logic based on pyqt version.
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.
Ahh, thanks for the heads-up. I think see the problem. It works fine so long as we don't extend WindowQt5
and then super will break... just found the perfect solution to this, just returned to the article I began reading the other day, and they have the solution.
https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ (see How to Incorporate a Non-cooperative Class). As far as I can see, we can apply the adapter pattern directly in qt_compat.py
.
Anyway, will look into this deeper once we have the main MEP27 branch merged and turn our focus onto the individual backends.
P.S. Sorry for the delay, turning email notifications off for PRs where I haven't had a mention seems to also not email about me about PRs...
6d379bc
to
cc1362a
Compare
27885ad
to
1b61b42
Compare
eb514d5
to
cc0d4cd
Compare
Vetter checks for python and IPython
620efb9
to
d842ee8
Compare
d842ee8
to
f857f7b
Compare
f857f7b
to
b061b9a
Compare
e7290fe
to
64f0c61
Compare
No description provided.