Hello,

I'm looking for a way to acces ui items dynamically.

In detail:

My program receives a command from about 50 register states. Each register has it's own item on the ui. The item could either be a lineEdit or a checkBox.

After receiving the status I'm going to look up the registers ui-item in a "database" (up till now most likely a textfile).

Qt Code:
  1. receivedData = receive();
  2. register = receivedData[0];
  3. item = lookup(register);
  4. if (lineEdit)
  5. {
  6. item->setText(receivedData[1]);
  7. }
  8. else if (checkbox)
  9. {
  10. item->setChecked(receivedData[1]);
  11. }
To copy to clipboard, switch view to plain text mode 

I hope you get what I'm trying to say. I want to know a way to access each item without haveing to write a specific function for each register.

Thanks in advance.