PDA

View Full Version : Get text from one dialog and do something with it to the other.



hakermania
8th January 2011, 02:20
Let's say that into the main window you have a lineedit, how can you open a dialog that displays the text of this lineedit?

example attached.

Thanks in advance for any answers :)

5731

ChrisW67
8th January 2011, 03:31
Either pass the value into the the_other_Dialog constructor or create a public method in the_other_Dialog that accepts a value to display.

hakermania
8th January 2011, 08:43
Hey, thanks for the reply.

Once being in the beginners' section, can you please point me somewhere that explains how to do one of these?:)

Lykurg
8th January 2011, 09:02
google for getter and setter methods. Also read about parameters: http://www.cplusplus.com/doc/tutorial/functions2/. It is all about basic c++ stuff.

hakermania
8th January 2011, 09:29
Omg, I know about parameters! Thx for the getter and setter methinds suggestion, though. :)

Added after 18 minutes:

Ok, I get it easily to work, thank you!