PDA

View Full Version : How to set a value from current widget to lineEdit on dialog?



unix7777
24th August 2012, 06:37
Hi,

I have QWidget and QDialog.
The QWidget has a button and label.
I want when i click the button to open the dialog and inside to be written the value from the QWidget's label.
I have tried to make it with emmiting signal, but when i open the dialog the signal is already emitted.

spirit
24th August 2012, 07:41
A demo app?

Zlatomir
24th August 2012, 07:42
Add a QString parameter to the dialog constructor, or code a member function that set the text and call that function before you show (or exec) the dialog.

unix7777
25th August 2012, 11:18
Thank you!