-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(qvtkinteractor): fix native widget drawing #200
base: main
Are you sure you want to change the base?
fix(qvtkinteractor): fix native widget drawing #200
Conversation
Codecov Report
@@ Coverage Diff @@
## main #200 +/- ##
=======================================
Coverage 97.22% 97.22%
=======================================
Files 8 8
Lines 648 648
Branches 90 90
=======================================
Hits 630 630
Partials 18 18 |
Looks like segfaults in almost every CI. Things were green on #202. Can you replicate locally @adam-grant-hendry ? |
@larsoner Yes, let me confirm where it’s happening. |
Bumps [check-jsonschema](https://github.com/python-jsonschema/check-jsonschema) from 0.17.0 to 0.17.1. - [Release notes](https://github.com/python-jsonschema/check-jsonschema/releases) - [Changelog](https://github.com/python-jsonschema/check-jsonschema/blob/main/CHANGELOG.rst) - [Commits](python-jsonschema/check-jsonschema@0.17.0...0.17.1) --- updated-dependencies: - dependency-name: check-jsonschema dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sphinx-notfound-page](https://github.com/readthedocs/sphinx-notfound-page) from 0.8 to 0.8.3. - [Release notes](https://github.com/readthedocs/sphinx-notfound-page/releases) - [Changelog](https://github.com/readthedocs/sphinx-notfound-page/blob/main/CHANGELOG.rst) - [Commits](readthedocs/sphinx-notfound-page@0.8...0.8.3) --- updated-dependencies: - dependency-name: sphinx-notfound-page dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Having `createWindowContainer` in `QVTKRenderWindowInteractor` is causing segfaults. Instead, teach users to add ```python window_ = QtGui.QWindow.fromWinId(self.plotter.winId()) self.container = self.createWindowContainer(window_, self) ``` to their `MainWindow` class.
5b138c9
to
07eb6fd
Compare
@larsoner I think the segfaults were from trying to add the window container within window_ = QtGui.QWindow.fromWinId(self.plotter.winId())
self.container = self.createWindowContainer(window_, self) We may just have to teach users to add this to their |
@larsoner @tkoyama010 Can I request one of you please review? |
I should be able to review in about a week. One comment without looking at the changes though:
We use a MainWindow subclass that gets used for BackgroundPlotter:
Maybe it could be added there? That would benefit PyVistaQt users who use BackgroundPlotter already (rather than the QtInteractor directly). This would also then test that your change works for BackgroundPlotter, and hence should work for users as well. And +1 for modifying |
I took a quick look and this does look good so far. Hopefully the |
@larsoner @tkoyama010 I was wrong: the errors occur when On Windows, X11, and MacOS, with Using an opengl paint engine, however, causes a problem. Since
Hence The QVTKOpenGL widgets were introduced to work with Qt's In Alternatively, if those DLL's can't be ported, we could try to implement these classes using the Python Wrappers developer notes. |
This change would need to be made at the VTK end... and this would not be easy. Also I'm still concerned that, even if they added these, they would necessarily be specific to one flavor of Qt (at least 6 vs 5, if not even as specific as 6.x.y vs 6.x.z). It might be worth searching the VTK issue tracker to see if anyone has brought up the idea of them shipping a Qt 6 variant of a https://gitlab.kitware.com/vtk/vtk/-/issues Feel free to ping me over there if you find an issue or open a new one (same username as GH)! |
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.
Just requesting that our MainWindow
subclass be modified if possible (and if it still makes sense)
I spoke with David Gobbi (@dgobbi), who created the first Instead, we agreed a pure python approach would be best. To that end, I've already begun writing all the
This is just one example, but there are several other rendering issues that support for |
Yes, it still makes sense. I should push the |
Sounds good, thanks for tackling this @adam-grant-hendry ! |
Of course, my pleasure. The VTK team has requested I get reviewers from the |
Yes, gladly! |
X11
before settingWA_PaintOnScreen
createWindowContainer
inQtInteractor
NOTE: Many tests are failing for bindings other than
PyQt5
. These fail before any of the above changes are introduced. To test different bindings (usingqtpy
andpytestqt
), be sure to set the environment variablesPYTEST_QT_API
andQT_API
.e.g.
See this pytestqt issue for more details on configuring your environment for testing.
Fixes #196