QVTKWidget and QVTKWidget behave differently; resizing breaks interactor for QVTKWidget2
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The attached small python test case shows some problems with QVTKWidget and QVTKWidget2. I'm using the latest VTK built from git HEAD.
1.) QVTKWidget and QVTKWidget2 behave differently. When the mouse moves over the plane, it gets highlighted green for QVTKWidget but no highlighting happens for QVTKWidget2. Is this a bug or a feature?
To reproduce, run python test-qvtkwidget.py 1 // to use QVTKWidget python test-qvtkwidget.py 2 // to use QVTKWidget2
2.) Try resizing the window when using QVTKWidget2 (see above). Now the plane cannot be dragged anymore. I have tracked this problem down, one can work around this by resizing the interactor in a resizeEvent like this:
def resizeEvent(self, event): #ordering is important here #1.) Let the QVTKWidget2 resize itself QVTKWidget2.resizeEvent(self,event)
w,h = self.width(), self.height()
#2.) Make sure the interactor is assigned a correct new size
self.renderWindow.GetInteractor().SetSize(w,h)