I'm trying to use QSlider
to change the value of a variable,
#include <QSlider>
class MainThread : public QWidget{
Q_OBJECT
public:
MainThread(QWidget *parent=0);
private slots:
void setValue(double);
private:
QSlider *slider;
};
MainThread::MainThread(QWidget *parent):QWidget(parent){
slider = new QSlider(Qt::Horizontal,0);
connect(&slider, SIGNAL((slider->valueChanged())),
this, SLOT(setValue(double))); // here's my problem
...
}
My question is how can I connect the SIGNAL
of the slider to the setValue(double)
SLOT.
Thanks in advance.