Slots don't work that way.
The signature(the parameters) of the signal must match the signature of the slot( but a slot can have fewer parameters than the signal, since it can ignore the extra ones).
You will eventually need to create a class for the main window and add a slot in your class( the following is the implementation of the slot):
void SomeClass::updateTextEdit(int value)
{
leValue.setText(str);
}
void SomeClass::updateTextEdit(int value)
{
QString str = QString("%1").arg(value);
leValue.setText(str);
}
To copy to clipboard, switch view to plain text mode
The line edit and the slider should be members in your class.
Then, you can connect like:
connect(sldValue, SIGNAL(valueChanged(int)), this, SLOT(updateTextEdit(int)));
connect(sldValue, SIGNAL(valueChanged(int)), this, SLOT(updateTextEdit(int)));
To copy to clipboard, switch view to plain text mode
This is pretty similar of what you want to do. It will set the current value of the slider in the line edit.
Regards
Bookmarks