I have a problem with qvtkwidget. I have a cube with the vtkimageplanewidget and i already made the connection between the sliders and them, but I want the slider to change also when I change the planes with the mouse in the qvtkwidget.
How can i do that?
Here's how I connected the slider eith the planes.
SLOT:
void planevolume::SplaneXpixel()
{
double xvalue=ui->Slider->value();
planeX->SetSliceIndex(xvalue);
ui->qvtkWidget->update();
}
and then:
connect(ui->Slider, SIGNAL(valueChanged(double)), this, SLOT(SplaneXpixel()));
What about the opposite? I tried:
SLOT:
void planevolume::planeXSpixel()
{
double xvalue=planeX->GetSliceIndex();
ui->Slider->setValue(xvalue);
ui->qvtkWidget->update();
}
and then:
connect(ui->qvtkWidget, SIGNAL(mouseEvent(QMouseEvent*)), SLOT(planeXSpixel()));
but it won't work, can anyone help me?