[vtk-developers] QVTKRenderWindowInteractor and resizeEvent

Clinton Stimpson clinton at elemtech.com
Tue Aug 30 13:57:34 EDT 2011


On Tuesday, August 30, 2011 11:40:11 am Panagiotis Mavrogiorgos wrote:
> > Yes.  But could you instead try something like super(vtkRenderWindow,
> > self._RenderWindow).SetSize(w.h) to not call the X11/Win32/etc.. code?
> 
> I tried to use super but vtk classes must be old-style classes, so it
> results in :
> 
> TypeError: super() argument 1 must be type, not vtkclass
> 
> The following seems to work though :
> 
> vtk.vtkRenderWindow.SetSize(self._RenderWindow, w, h)
> 
> If this is ok, then the resizeEvent method perhaps could be implemented
> like this:
> 
>     def resizeEvent(self,ev):
>         w = self.width()
>         h = self.height()
>         vtk.vtkRenderWindow.SetSize(self._RenderWindow, w, h)
>         self._Iren.SetSize(w, h)
>         self._Iren.ConfigureEvent()
>         self.update()

Yeah, that looks fine.  Does that solve your problem?

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com



More information about the vtk-developers mailing list