I am working at a part of a big project.
My goal is it to show a vtkRenderer
in a QWidget
. For that I wrote this class:
CModelViewWidget::CModelViewWidget(QWidget *parent) :
QWidget(parent)
{
_qVtkWidget = new QVTKWidget(this,Qt::Widget);
_rend = vtkRenderer::New();
this->showVTK();
_qVtkWidget->GetRenderWindow()->AddRenderer(_rend);
}
where _qVtkWidget
is a QVTKWidget
, _rend
a vtkRenderer
and showVTK()
a function that adds a sphere to _rend
.
I am able to compile this things, but when I want to test them the program crashes. The error message is:
[pathToProject]/qtCT/qtcreator-build/bin/mabviewer: symbol lookup error:[pathToProject]/qtCT/qtcreator-build/lib/libplugwdgt_modelviz.so: undefined symbol: _ZN10QVTKWidgetC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE
I am using VTK5.8, QTCreator 2.4.1 with QT 4.7.4 and cmake. I linked the project and VTK and showing a normal vtkRenderWindow
works fine. Is there something else to do, before QVTKWidget
works?