[vtkusers] Change VTK actor property in a Qt callback function

M. Jordan mjordan at live.at
Tue Nov 15 07:37:48 EST 2016


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)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161115/00d1dcf0/attachment.html>


More information about the vtkusers mailing list