Hello Everyone,

I have a widget with one LineEdit and one save button. On save button click i am calling a slot and in slot i need the data which i enter in LineEdit.
But i am not able to get the data in slot function which i have enetered in lineedit. Thanx in advance.

QWidget *Thresholdwindow = new QWidget;
QLabel *label = new QLabel("Threshold Input");
QLineEdit *lineedit = new QLineEdit(Thresholdwindow);
QPushButton *Save = new QPushButton("Save");
QPushButton *Cancel = new QPushButton("Cancel");
QFormLayout *layout = new QFormLayout;
layout->addRow(label, lineedit);
layout->addRow(Save, Cancel);
int thresholdval = lineedit->text().toInt
connect(Save, SIGNAL(clicked()), this, SLOT(saveThreshold(thresholdval)));

void MainWindow::saveThreshold(int val)
qDebug() << val ;