You'll want to add this to your *.h file (replace MyClass with your class name):
MyClass {
public:
...
private:
int c;
private slots:
void setVal(int);
}
MyClass {
public:
...
private:
int c;
private slots:
void setVal(int);
}
To copy to clipboard, switch view to plain text mode
implement the slot as follows:
void MyClass::setVal(int value)
{
c = value;
}
void MyClass::setVal(int value)
{
c = value;
}
To copy to clipboard, switch view to plain text mode
finally, change your connection to this:
QObject::connect(slider,
SIGNAL(valueChanged
(int)),
this,
SLOT(setVal
(int)));
QObject::connect(slider, SIGNAL(valueChanged(int)), this, SLOT(setVal(int)));
To copy to clipboard, switch view to plain text mode
That ought to get you started
Bookmarks