It's not easy, but I try to explain:

The window is created as a library that is used as object in the main application.

Before the arrival of a message from the main aplicacatio, updated a number of areas of the window:

Qt Code:
  1. switch (consoleId) {
  2. case 1:
  3. {
  4. itsRoleWindow->writeTF_roleConsole01(strdup(static_cast<char*> (roleActiveName[consoleId - 1])));
  5. break;
  6. }
  7. case 2:
  8. {
  9. itsRoleWindow->writeTF_roleConsole02(strdup(static_cast<char*> (roleActiveName[consoleId - 1])));
  10. break;
  11. }
  12. [...]
To copy to clipboard, switch view to plain text mode 

Let's see what happens in the window:

Qt Code:
  1. void roleWindow::writeTF_roleConsole01(char* c)
  2. {
  3. GetForm()->setText(c,1);
  4. }
To copy to clipboard, switch view to plain text mode 

The class that receives it does this:

Qt Code:
  1. void impl_role::setText(char* c, int i)
  2. {
  3. emit(signalSetText(c,i));
  4. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. connect( this, SIGNAL(signalSetText(char*, int)), this, SLOT(slotSetText(char*, int)) );
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void impl_role::slotSetText(char* c, int i)
  2. {
  3. switch(i) {
  4. case 1: TF_roleConsole01->setText(c); break;
  5. case 2: TF_roleConsole02->setText(c); break;
  6. case 3: TF_roleConsole03->setText(c); break;
  7. case 4: TF_roleConsole04->setText(c); break;
  8. case 5: TF_roleConsole05->setText(c); break;
  9. case 6: TF_roleConsole06->setText(c); break;
  10. case 7: TF_roleConsole07->setText(c); break;
  11. default: break;
  12. };
  13. delete (c);
  14. }
To copy to clipboard, switch view to plain text mode 

with each TF_roleConsole0x really is ui-> TF_roleConsole0x;

Therefore, writes directly to each window Textfield.

I hope I explained more or less.