[vtkusers] Using VTK widgets in Qt renderers

Clinton Stimpson clinton at elemtech.com
Wed Feb 10 21:13:59 EST 2010


On Feb 10, 2010, at 3:35 PM, David Doria wrote:

> 
> On Mon, Feb 8, 2010 at 4:22 PM, Wagner Sales <wsales at gmail.com> wrote:
> Hi David,
> 
> I  didn't the test with to renderers. Can you post the entirely code?
> Of course, if you don't have problems to do this. I'll try to test.
> 
> Wagnre
> 
> Wagner also took a look at this and found that the border widget does not appear. Is this a known issue? Or we doing something wrong?
> 

This works for me.


int main(int argc, char** argv)
{
  QApplication app(argc, argv);
  QVTKWidget w;
  w.resize(400,400);
  vtkSmartPointer<vtkRenderer> ren = vtkSmartPointer<vtkRenderer>::New();
  w.GetRenderWindow()->AddRenderer(ren);
  vtkRenderWindowInteractor* iren = w.GetInteractor();
  vtkSmartPointer<vtkBorderWidget> border = vtkSmartPointer<vtkBorderWidget>::New();
  border->SetInteractor(iren);
  border->SetResizable(1);
  border->On();
  w.show();
  return app.exec();
}


Clint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100210/18bf0702/attachment.htm>


More information about the vtkusers mailing list