PDA

View Full Version : how data of one dialog sent to other dialog



gauravg
26th August 2012, 19:31
hi all please tell how data entered in linedit of one dialog can be sent to another dialog .



thanks with regards:
gulshan

tbscope
26th August 2012, 20:14
Assuming:
1. The dialogs don't know about each other
2. You have an object that manages the two dialogs, like a main window

Create a signal in your main window to update the necessary dialogs. Connect a slot in your dialog to the signal from the main window. For example, a slot in dialog 2 is connected to the update signal of the main window.

Connect a signal of the lineedit or a button from dialog 1 to a slot in the main window.

In the slot of the main window, fire the update signal.

Either pass the data via the signal, or have it stored in some accessible place for the dialogs.

Should be basic Object Oriented Programming.
There are several other solutions.