[vtkusers] QVTKWidget + QGraphicsview as viewport

Clinton Stimpson clinton at elemtech.com
Tue Nov 3 23:22:47 EST 2009


I've seen stack overflow if a needed function is not implemented in  
QVTKPaintEngine.
You should be able to tell which one with a debugger.

Clint

On Nov 3, 2009, at 11:10 AM, Zoltán Bárdosi wrote:

> 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.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/ 
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http:// 
> www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091103/16994ddb/attachment.htm>


More information about the vtkusers mailing list