Read this: http://www.qtcentre.org/forum/f-newb...form-4471.html

If you use a modal dialog, you can retrieve the data using normal methods that just return contents of some widget from that dialog:
Qt Code:
  1. void SomeWindow::showDialog()
  2. {
  3. SomeDialog dlg( this );
  4. if( dlg.exec() == QDialog::Accepted ) {
  5. something = dlg.something();
  6. someOtherThing = dlg.someOtherThing();
  7. }
  8. else {
  9. // user has rejected the dialog
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 

But if you want modeless dialogs, you have to use signals and slots mechanism (at least to notify the other window that it can read the data). Something like this connected with:
Qt Code:
  1. void EditorWindow::findNext()
  2. {
  3. QString keyword = findDialog->keyword();
  4. // do something with keyword
  5. }
To copy to clipboard, switch view to plain text mode 
Of course you can also use signals to pass the data. This way you could have something like this:
Qt Code:
  1. void EditorWindow::findNext( const QString& keyword )
  2. {
  3. // do something with keyword
  4. }
To copy to clipboard, switch view to plain text mode