[vtkusers] Using QVTKWidget2 - an example or two

harshad1 hsriniv2 at ncsu.edu
Mon Nov 9 02:02:20 EST 2015


Hi all, 

As far as I can tell, I should be using QVTKWidget2 rather than QVTKWidget 
Z Buffer issues
<http://vtk.1045678.n5.nabble.com/Using-QVTKWidget-with-QT5-on-Linux-td5731791.html>  
Possibly deprecated? <http://www.paraview.org/Bug/view.php?id=15469>  
More z buffer trouble
<http://stackoverflow.com/questions/24131430/vtk-6-1-and-qt-5-3-3d-objects-in-qvtkwidget-with-bad-transparencies>  

My linux laptop runs Mesa 11.0.4 and I am experiencing the z buffer bug
explained in the link above (VTK 6.3 and QT 5.5.1)

My QVTKWidget2 code compiles fine but doesn't work. This is not surprising -
All I've done is nievely replace QVTKWidget with QVTKwidget2:

>>====================================================================
>>    display = new QVTKWidget2();
>>    ui->mainLayout->insertWidget(0,display,3);
>>
>>    //Setup rendering 
>>    //---------------    
>>    displayRenderer = vtkSmartPointer<vtkRenderer>::New();
>>
>>    //displayRenderWindow = vtkSmartPointer<vtkRenderWindow>::New();
>>    //display->SetRenderWindow(displayRenderWindow);
>>    //displayRenderWindow->AddRenderer(displayRenderer);
>>
>>    display->GetRenderWindow()->AddRenderer(displayRenderer);
>>
>>    //Adding an axis actor
>>    //-------------------
>>    vtkSmartPointer<vtkAxesActor> axes =
>>        vtkSmartPointer<vtkAxesActor>::New();
>>    axes->SetShaftType(vtkAxesActor::CYLINDER_SHAFT);
>>    displayRenderer->AddViewProp(axes);
>>
>>    displayRenderer->ResetCamera();
>>====================================================================

All I get is a blank screen. I can't seem to find any examples or tutorials
on using QVTKWidget2. I would appreciate it a lot if someone could help me
figure this out.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Using-QVTKWidget2-an-example-or-two-tp5734874.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list