[vtkusers] Interactor is in a small part of the windows
Etudes NG
nathanael.geng at etudes-ng.net
Wed Mar 19 11:55:07 EDT 2014
Hello,
I try to combine Qt and vtk in an open GL widget like in
example GUI/Qt/GraphicsView.
Unfortunately I cannot compile vtk and my distrib did not provide qvtk (or
at least did not provide QVTKWidget2), this is just an information and
maybe my problem source...
All is working good, I have just a problem with the interactor which is
only at the top left corner of my windows (black square):
[image: Images intégrées 1]
Here is the code:
vtkSmartPointer<vtkRenderer> renderer;
vtkSmartPointer<vtkRendererCollection> rendererColl;
rendererColl = widget->getWidgetGL()->GetRenderWindow()->GetRenderers();
GetInteractor()->SetRenderWindow(widget->getWidgetGL()->GetRenderWindow());
if(!rendererColl->GetFirstRenderer())
{
rendererColl->AddItem(vtkSmartPointer<vtkRenderer>::New());
}
renderer = rendererColl->GetFirstRenderer();
renderer->AddActor(assembly);
widget->getWidgetGL()->GetRenderWindow()->AddRenderer(renderer);
_renderView->ResetCamera();
Thanks in advance for the help!
Nathanaël
PS: Is there a way to write the code cleaner in the mailing list?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140319/31dea0ea/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Interactor.png
Type: image/png
Size: 15945 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140319/31dea0ea/attachment.png>
More information about the vtkusers
mailing list