@Pablo-J.-Rogina said in passing data from form to Mainwindow:
...
// create your dialog
dpDlg = new delayProg(this);
// no need to connect any signal...
// show the dialog
dpDlg->show();
// dialog closed, get the value of LCD
double delay = dpDlg->getDelay();
Just a side note here, you'd have to change dpDlg->show() to:
if (dpDlg->exec() == QDialog::Accepted)
{
delay = dpDlg->getDelay();
}
I know he's not using that method but didn't want someone else to come along after and wonder why that wasn't working since show() returns immediately. :)