[vtk-developers] [VTK 0011852]: QVTKWidget and QVTKWidget behave differently; resizing breaks interactor for QVTKWidget2
Mantis Bug Tracker
mantis at public.kitware.com
Mon Feb 14 07:46:53 EST 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=11852
======================================================================
Reported By: thorbenk
Assigned To:
======================================================================
Project: VTK
Issue ID: 11852
Category: Development
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-02-14 07:46 EST
Last Modified: 2011-02-14 07:46 EST
======================================================================
Summary: QVTKWidget and QVTKWidget behave differently;
resizing breaks interactor for QVTKWidget2
Description:
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
http://public.kitware.com/Bug/view.php?id=1.) Let the QVTKWidget2 resize
itself
QVTKWidget2.resizeEvent(self,event)
w,h = self.width(), self.height()
http://public.kitware.com/Bug/view.php?id=2.) Make sure the interactor
is assigned a correct new size
self.renderWindow.GetInteractor().SetSize(w,h)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-02-14 07:46 thorbenk New Issue
2011-02-14 07:46 thorbenk File Added: test-qvtkwidget.py
======================================================================
More information about the vtk-developers
mailing list