Hello,

I'm constructing multiple QDialogs from a button on a QMainWindow.
Each dialog gets filled with different data when constructed and I (may) edit this data.
I can find which dialogs have been edited and get the dialogs objectName when I click
the qmainwindow 'save' button.
Is it possible to access, say a QLabel->text() on one of the dialogs only knowing the dialogs objectName?
If 'yes, how?
Perhaps I should adopt a different approach.

Regards
Qt Code:
  1. class propForm : public QDialog
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. propForm(QWidget *parent = 0);
  7. ...
  8.  
  9. propForm::propForm(QWidget *parent) : QDialog(parent)
  10. {
  11. ...
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void myMaiWindow::showDialogButton() // slot
  2. {
  3. cm::formCount += 1;
  4. prop = new propForm(this);
  5. prop->setObjectName("prop" + QString::number(cm::formCount));
  6. qDebug() << "name - " << prop->objectName();
  7. }
  8.  
  9. void myMainWindow::saveButton() // slot
  10. {
  11. qDebug() << "Save - " << cm::filePath;
  12. qDebug() << "last Lost - " << cm::formLostFocus << "\n";
  13.  
  14. QList<QDialog *> widgets = findChildren<QDialog *>();
  15. qDebug() << widgets;
  16.  
  17. for (int i; i < cm::formCount; i++) {
  18. // if edited get data and save the file
  19. // getting the data is the don't know bit.
  20. }
To copy to clipboard, switch view to plain text mode