Happy New Year to you all! Here is my development environment:<br><br>Windows Vista x64<br>VS 2008<br>VTK 5.6.1 x64, (compiled by myself, with Shared_Lib = ON)<br>QT 4.7.2 (LGPL, qt-win64-opensource-4.7.2-noqt3-vs2008.exe)<br>
qt-vs-addin-1.1.10.exe<br><br>
I installed and configured everything without any problems. While compiling/building VTK from source, all Qt examples under C:\VTK\VTKCode\Examples\GUI\Qt were built and run successfully. It looks like I am ready to rock.<br>
<br>From VS 2008, I created a Qt4 Project | Qt Applicaton, drag-and-dropped QVTKWidget onto QMainWindow in Qt Designer. I could build and run this simple example without any problem. However, after I added a vtkConeSource to this QVTKWidget, I could not run my compiled MyTest.exe and got an error message saying "MyTest.exe has stopped working". What am I missing here? I added all LIBs to Additional Dependencies and all VTK DLLs are in PATH. I am stuck here and could not move further. Please help! Thank you.<br>
<br>I copied vtkConeSource code from qtevent example as below:<br><br>MyTest::MyTest(QWidget *parent, Qt::WFlags flags)<br> : QMainWindow(parent, flags)<br>{<br> ui.setupUi(this);<br><br> // create a window to make it stereo capable and give it to QVTKWidget<br>
vtkRenderWindow* renwin = vtkRenderWindow::New(); <br> qvtkWidget->SetRenderWindow(renwin);<br> renwin->Delete();<br> <br> const double angleSensitivity=0.02;<br> const double translationSensitivity=0.001;<br>
<br> QVTKInteractor *iren=qvtkWidget->GetInteractor();<br> vtkInteractorStyle *s=<br> static_cast<vtkInteractorStyle *>(iren->GetInteractorStyle());<br> vtkTDxInteractorStyleCamera *t=<br> static_cast<vtkTDxInteractorStyleCamera *>(s->GetTDxStyle());<br>
<br> t->GetSettings()->SetAngleSensitivity(angleSensitivity);<br> t->GetSettings()->SetTranslationXSensitivity(translationSensitivity);<br> t->GetSettings()->SetTranslationYSensitivity(translationSensitivity);<br>
t->GetSettings()->SetTranslationZSensitivity(translationSensitivity);<br><br><br> // add a renderer<br> Ren1 = vtkRenderer::New(); # declared in header and deleted in destructor<br> qvtkWidget->GetRenderWindow()->AddRenderer(Ren1);<br>
<br> // put cone in one window<br> vtkConeSource* cone = vtkConeSource::New();<br> vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();<br> mapper->SetInput(cone->GetOutput());<br> vtkActor* actor = vtkActor::New();<br>
actor->SetMapper(mapper);<br> Ren1->AddViewProp(actor);<br> actor->Delete();<br> mapper->Delete();<br> cone->Delete();<br>}<br><br>Thanks a lot.<br>John<br><br>