You are not logged in.

1

Wednesday, June 15th 2011, 1:49pm

QVTKWidget issues

Hi everyone,
I'm new to VTK and Qt. I can compile and run Qt and VTK applications but I need to integrate VTK into my Qt GUI. I tried to create an application using QVTKWidget but it crashes on
QVTKWidget *myWidget = new QVTKWidget;
with following message
The program '[6048] xxxxx.exe: Native' has exited with code 1 (0x1).

If I comment this line everything works fine.

#include <QMainWindow>
#include <QWidget>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);

QMainWindow mainWindow;
mainWindow.setWindowTitle("My Widget");
mainWindow.setGeometry(100, 100, 500, 355);

QVTKWidget *myWidget = new QVTKWidget;

mainWindow.show();

return app.exec();
}

Any ideas?

Regards, Alex

2

Tuesday, February 7th 2012, 4:24pm

Change that line with:

QVTKWidget widget;

Hope it helps.

3

Tuesday, February 7th 2012, 6:08pm

What version of qt is qvtkwidget built with? have you debugged into the qvtkwidget constructor? what version is your Qt library?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.