[vtkusers] Change VTK actor property in a Qt callback function
Dan Lipsa
dan.lipsa at kitware.com
Tue Nov 15 13:16:17 EST 2016
Move your actor and maybe other VTK objects as fields of your gui object.
This way you can access them in your event handler.
On Tue, Nov 15, 2016 at 7:37 AM, M. Jordan <mjordan at live.at> wrote:
> All my vtk related code is in the constructor function of a Qt GUI. There
> I can change a property of a VTK actor like this:
>
> actor->GetProperty()->SetColor(0, 0, 0.15);
>
> But I want to change this proberty in a callback function from a button.
>
> void MainWindow::button_click() { actor->GetProperty()->SetColor(0,0,
> 0.15); }
>
> Of course "actor" is not defined there. What can I do to acess "actor" in
> this callback function?
>
> (Sry I am an OOP beginner)
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161115/eb644a3e/attachment.html>
More information about the vtkusers
mailing list