I apologize for being an incompetent newbie, but I am having a problem in extracting the data imbedded in a form, once the user has completed it.
The form is named SystemSettingsDialog, and has a relatively large number of fields for the user to complete. The user signals completion by pressing an OK button or a Cancel button. If the user selects OK, I need to process the data entered in the form. For the sake of simplicity, I will assume that the the form contains a QLineEdit named "name", and two buttons named "OKButton" and "CancelButton"
The form is launched using a signal from the MainWindow. The OKButton is connected to accept, and the CancelButton is connected to reject the dialog.
Here is the relevant code:
in MainWindow.cpp, I have the code to launch the dialog
systemsettingsdialog *SystemSettingsDialog = 0;

void MainWindow::on_actionSystem_Settings_triggered()
{
SystemSettingsDialog = new systemsettingsdialog(this);
reply = systemsettingsDialog->exec();
if (reply)
{
// How do I retrieve name->text from the form? See note 1
}
delete SystemSettingsDialog;

}
In systemsettingsdialog.cpp I have the following code
systemsettingsdialog::systemsettingsdialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::systemsettingsdialog)
{
// Setup dialog from SystemSettingsData See note 2
ui->setupUi(this);
}
  1. Is there any way I can access the ui class at this point to get the data
  2. It appears that I can populate the ui class with data from another source, but I have not tested this yet


Thank you in advance for any advice.

-a.