[Qt-creator] Passing a value back from a form
André Pönitz
andre.poenitz at nokia.com
Wed Mar 23 10:57:44 CET 2011
On Tuesday 22 March 2011 20:44:23 ext Robert Wood wrote:
> I am trying to create a pop-up window that has a load of JPEGs on it.
> When one of the JEPGs (which is put on a push button) is clicked, I want
> the form to close and a value dependent on which button is pressed
> passed back to the calling form.
You could connect a button's 'clicked()' signal to some slot in your
"main code" that closes the window and sets the return value.
For multiple buttons that would be multiple slots, or a case for
QSignalMapper (or a single slot examining its sender())
Andre'
More information about the Qt-creator-old
mailing list