Quote Originally Posted by wysota View Post
Just remember, despite having to write less lines of code to use findChild this is actually slower to execute than 100 copy&paste of the manual code that retrieves a single pointer. So all in all it is a matter of balance between the number of lines of code you have to write (once) and the amount of code that needs to be executed (every time you run your app).
Yea, I thought about that.

I had the code written and ready just before I started the thread, but in my honest opinion I don't really like the idea of doing this kind of manual job when it can be avoided.

I said I have 100 elements but I actually have 3 stacked widgets with 100 each - but that doesn't affect anything, so I decided to make it simple to present the problem. All elements are essential to the app - they are results of a laboratory experiment that must be informed as float (or double, I don't really know the difference).

I haven't got much time right now (couldn't even open Qt today ), but I think that the list is the best option for me.
But still, does anybody know what's wrong here? I'm trying to use findChild. I have tried to use parentWidget instead of centralWidget, but no difference.

Qt Code:
  1. QLineEdit *lineedit = centralWidget->findChild<QLineEdit *>("t01");
To copy to clipboard, switch view to plain text mode 

The error message I get is this

'->QObject::findChild' : left operand has " type, use '.'


Edited: This may be helpful

structure.png