Hello!

As I wrote yesterday in another post, I have to read QStrings from many QLineEdits.
The answer was that this is best accomplished through a class using a QList of QLineEdits. But I have to set the names of all lineedits somehow.

Is it possible to access the variables through their QString'ed name?

Is something like that possible:

Qt Code:
  1. QLineEdit lineedit_1
  2. QLineEdit lineedit_2
  3. QLineEdit lineedit_3
  4. ...
  5.  
  6. QString lineedit1, lineedit2, lineedit3
  7.  
  8. QStringList lineedits
  9. lineedits << "lineedit1" << "lineedit2" << "lineedit3".....
  10.  
  11. while (lineedits.hasNext)
  12. {
  13. PseudoCode: lineedits[INDEX] = SameNamedQLineEdit_[INDEX].text();
  14. }
To copy to clipboard, switch view to plain text mode 

Well somehow my feeling points to "not possible, find another solution"
Kind regards,
HomeR