how to response vtkButtonWidget?such as LeftButtonPressEvent

I created a vtkButtonWidget and want to do some work when I click the buttonwidget with the left button of mouse, so I add a observer to the buttonwidget, but when I click ,it has no action. what is wrong with the codes?

class vtkButtonCallback : public vtkCommand
{
public:
static vtkButtonCallback *New()
{
return new vtkButtonCallback;
}
virtual void Execute(vtkObject caller, unsigned long, void)
{
if (ev == vtkCommand::LeftButtonPressEvent)
{
return;
}
}
};

// Create the widget and its representation
vtkSmartPointer<vtkTexturedButtonRepresentation2D> buttonRepresentation =
	vtkSmartPointer<vtkTexturedButtonRepresentation2D>::New();
buttonRepresentation->SetNumberOfStates(1);
buttonRepresentation->SetButtonTexture(0, image1);

vtkSmartPointer<vtkButtonWidget> buttonWidget =
	vtkSmartPointer<vtkButtonWidget>::New();
buttonWidget->SetInteractor(renderWindowInteractor);
buttonWidget->SetRepresentation(buttonRepresentation);

vtkButtonCallback *myBtnCallback = vtkButtonCallback::New();
buttonWidget->AddObserver(vtkCommand::LeftButtonPressEvent, myBtnCallback);

We have tried to use VTK widgets in Slicer but there they had so many problems and limitations that we gave up on them.

I would recommend to add custom buttons in the view controller bars:

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Customize_widgets_in_view_controller_bars