4 Slider::Slider(QWidget
*parent
, QString caption
, int min
, int max
):QDialog(parent
) {
6 connect(horslider
, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int)));
7 connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
8 setWindowTitle(caption
);
9 horslider
->setMinimum(min
);
10 horslider
->setMaximum(max
);
14 return horslider
->value();
16 void Slider::slotValueChanged(int step
) {
17 setWindowTitle(tr("Value =%1 ").arg(step
));