From 5b138c9eca6a87c8855340a3ee3fbfad9d02ddf0 Mon Sep 17 00:00:00 2001 From: "Hendry, Adam" Date: Fri, 15 Jul 2022 17:51:05 -0700 Subject: [PATCH] fix(container_window): remove `createWindowContainer` 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. --- pyvistaqt/plotting.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyvistaqt/plotting.py b/pyvistaqt/plotting.py index 51153323..0476e65d 100644 --- a/pyvistaqt/plotting.py +++ b/pyvistaqt/plotting.py @@ -55,7 +55,7 @@ from pyvista.plotting.plotting import BasePlotter from pyvista.plotting.render_window_interactor import RenderWindowInteractor from pyvista.utilities import conditional_decorator, threaded -from qtpy import QtCore +from qtpy import QtCore, QtWidgets from qtpy.QtCore import QSize, QTimer, Signal from qtpy.QtWidgets import ( QAction, @@ -270,9 +270,6 @@ def __init__( self._first_time = False # Crucial! LOG.debug("QtInteractor init stop") - window_ = QtGui.QWindow.fromWinId(self.winId()) - self.createWindowContainer(window_, self) - def _setup_interactor(self, off_screen: bool) -> None: if off_screen: self.iren: Any = None