You don't say anything about where you have defined this list of variables. If they are defined at class scope (eg. as members of the MainWindow class), then in your slot that handles the clicked() signal, you can simply access the value of "thresholdval".
Your slot to handle the clicked() signal must have the same signature as the signal itself:
MainWindow::MainWindow()
{
// ...
connect(Save, SIGNAL(clicked()), this, SLOT(onClicked()));
}
void MainWindow::onClicked()
{
someFunctionToSaveTheValue( thresholdval );
}
MainWindow::MainWindow()
{
// ...
connect(Save, SIGNAL(clicked()), this, SLOT(onClicked()));
}
void MainWindow::onClicked()
{
someFunctionToSaveTheValue( thresholdval );
}
To copy to clipboard, switch view to plain text mode
Of course, "thresholdval" must be a member variable of the MainWindow class. If you define it as a local variable within a method, then it has no visibility outside that method.
Bookmarks