I have created a Qt Gui application which has two forms: mainwindow.ui and childwindow.ui.

I have a LineEdit controls on both forms. How can I access the text on the mainwindow from the childwindow and vice-versa?

Normally, on the same from I will use the code:
Qt Code:
  1. ui->lineEdit1->text();
To copy to clipboard, switch view to plain text mode