[vtkusers] QVTKWidget + QGraphicsview as viewport

Zoltán Bárdosi hckrobin at hotmail.com
Tue Nov 3 13:10:22 EST 2009


Hello all,

I'd like to have a Qt+VTK integration similar to the Examples/GUI/Qt/GraphicsView.
My problem is that if I add a simple combo-box to the embedded dialog, the program crashes with stack overflow when I click on the combo box.
Other controls seems to work (button, checkbox...).

You can(?) reproduce if you put 

  QComboBox *cb = new QComboBox();
  cb->addItem("first");
  cb->addItem("second");
  d->layout()->addWidget(cb);

into MyScene::MyScene().


If I change the viewport from the QVTKWidget to a QGLWidget:

//this->setViewport(mWidget);
this->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));

and comment the paintEvent, drawBackground implementations, then
the embedded widget seems to work fine with the combobox. (but there is no vtk render).

if I don't remove paintEvent, drawBackground, then nothing is visible..

Do you have any idea what is wrong, and how can I get it working?

Thanks,
Zoltan

 		 	   		  
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091103/188e0e4f/attachment.htm>


More information about the vtkusers mailing list