I'm trying to make an small gui to deploy .ear and .war files on my local glassfish installation. SO i have made five rows containing a file name field, a checkbox and a button to bring up a file dialogbox to locate the war/ear file. It would be nice to have all buttons call the same function and from the function sort out which of the five buttons who made the call ( to update the correct text fields ). Don't know if this is the intended way of doing it in an object oriented way but my only gui programming experience is some old win16 event loops :).
//BRG Anders Olme
Connect each button's
click()
signal with one and the same slot and useQObject * QObject::sender () const [protected]
in this slot to find out which button sent the signal (was clicked). Alternatively you could useQSignalMapper
which is a special class made just for this kind of task.