I have a qwtslider and I want to get the value to apply on a vtkImagePlaneWidget, but i can't figure out how to do this. I've been using getValue() but it won't work.
I have the function to transfer it:
void planevolume::SplaneX()
{
double xvalue=ui->Slider->getValue();// this does not work
planeX->SetSliceIndex(xvalue);
ui->qvtkWidget->update();
that will work as a slot, and
// X Slider
ui->doubleSpinBox->setDecimals(0);
ui->doubleSpinBox->setMaximum(xmax);
ui->doubleSpinBox->setSingleStep(1.0);
ui->doubleSpinBox->setValue((xmax-xmin)/2.0);
ui->Slider->setRange(xmin, xmax, 1.0);
ui->Slider->setScale(xmin, xmax+1.0, (xmax+1.0)/4.0);
ui->Slider->setValue((xmax-xmin)/2.0);
connect(ui->Slider, SIGNAL(valueChanged(double)), ui->doubleSpinBox, SLOT(setValue(double)));
connect(ui->doubleSpinBox, SIGNAL(valueChanged(double)), ui->Slider, SLOT(setValue(double)));
connect(ui->Slider, SIGNAL(valueChanged(double)), this, SLOT(SplaneX()));
how can i do it? does anyone has any idea?