[vtkusers] vtk / qt question: qvtkwidget does not resize properly

Christian Zemlin zemlinc at upstate.edu
Thu Nov 18 08:31:32 EST 2010


Hi vtk-users,

I would like to use qvtkwidget to render with vtk in a Qt application.  
I started with a standard vtk example:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/BorderWidget

which renders a sphere.

For layout, I created a project in QtCreator, placed a qvtkwidget as the
only widget in the the form, and applied a vertical (I also tried
horizontal) layout.  

This compiles and runs, but when I resize the main window, the qvtkwidget
resized only in the vertical direction (and the sphere grows/shrinks
accordingly).  In the horizontal direction, the size is fixed, no matter how
much I enlarge the main window in horizontal direction.

This problem occurs independently of which "size policy" I use in the Qt
designer.

Looking forward to your comments,

Christian




More information about the vtkusers mailing list