-
Notifications
You must be signed in to change notification settings - Fork 19
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
🚧 Add basic qtpy layer #12
Conversation
What is missing now is synchronizing |
When I use
I evaluated the mro of each of the backends: with PySide2:
with PyQt5:
So I can only assume that there is something different in the way the parameters are handled somewhere in
At this step, I don't really want to mess with the inheritance sequence considering all the constraints:
Maybe someone else can have a look at the mro and notice something strange that I missed? Meanwhile, I'll keep thinking about the architecture. |
I don't see any solution here without changing the architecture. |
The architecture has been changed very recently in #25. Let's give it a try again. |
It works for me locally with |
And I downgraded |
Codecov Report
@@ Coverage Diff @@
## master #12 +/- ##
=======================================
Coverage 94.90% 94.90%
=======================================
Files 5 5
Lines 432 432
=======================================
Hits 410 410
Misses 22 22 |
Code coverage is working! |
@GuillaumeFavelier is this good to go? Maybe a rebase now that |
This basic version should work but I would like to improve it further. For example in the case where both PySide and PyQt5 are installed, I need to make sure that QtPy and VTK use the same python Qt binding. Plus I want to rework the testing for it.
I'll rebase asap 👍 |
Hey. Just wondering what's holding this issue up? I actually ran the code locally on my machine and it seems to be working. My use case is that I really want to use pyvistaqt, but the pyqt5 licence is stopping me. Using qtpy instead of pyqt5 is a genius move that would allow users more freedom. I want to use pyside2, and it seems to be working. Do you need help to get this done? Maybe update the documentation? The code examples would |
@larsoner , I see that @GuillaumeFavelier has not been active on this pull request for quite some time. I hope I'm not stepping on any toes, but if it would be helpful I can help with this issue. I fetched Guillaume's branch and updated it with the pyvista master branch, and made some other small changes to get things working. I also updated the test files. I have submitted a pull request GuillaumeFavelier#1 to Guillaume's branch in the hopes that, if he accepts the changes, they will be automatically incorporated into this issue. If it's easier I can create a new pull request. Just let me know. Anyway, I hope I'm not offending anyone. I just want to be helpful. Plus, I have some time now to work on this issue. Being able to use pyvistaqt with qtpy instead of pyqt5 would be a really wonderful thing, and would make pyvistaqt more usable to people who are afraid of pyqt5's license. |
Agreed we should move forward with this, I doubt @GuillaumeFavelier will mind. Feel free to start your own PR with his commits cherry-picked, then yours on top (with a merge or rebase with latest |
Thank you. My work was a continuation of his. I fetched his branch and just added commits to it. I'll create a new PR really soon. |
@nicobako you're right, I didn't work on this for a while, thanks for the push! :) |
Closing as duplicate of #61 |
I know I am coming to the party late, but I wanted to comment that the approach used here is proper on several levels. Not only does Please see my comment here on |
I think this PR could help #8 by using a thin qt abstraction layer.
The goal would be to have one code and change the
QT_API
accordingly or possibly auto-detect it.Basic testing with
PySide2
would be nice to have too.