Created
July 3, 2012 20:29
-
-
Save fmorency/3042843 to your computer and use it in GitHub Desktop.
VTKMdiSubWindowInteractor example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QVTKRenderMdiSubWindowInteractor(QMdiSubWindow): | |
def __init__(self, parent=None, | |
wflags=Qt.WindowFlags() | Qt.WA_DeleteOnClose): | |
super(QVTKRenderMdiSubWindowInteractor, self).__init__(parent, wflags) | |
self.qhbox = QHBoxLayout() | |
self.qframe = QFrame() | |
self.vtk_interactor = QVTKRenderWindowInteractor(parent=self.qframe) | |
self.qhbox.addWidget(self.vtk_interactor) | |
self.qframe.setLayout(self.qhbox) | |
self.setWidget(self.qframe) | |
def closeEvent(self, ev): | |
self.vtk_interactor.closeEvent(ev) | |
def GetRenderWindow(self): | |
return self.vtk_interactor.GetRenderWindow() | |
def Render(self): | |
self.GetRenderWindow().Render() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment