Hey Jimmy, 2009/1/20 Jimmy Kung <[email protected]>: > I am wondering if anyone can give me some pointers or examples on how to > pass argument(s) from WPushButton to the Slot. > In the following example, I created a WPushButton and tried to connect it > with a SLOT and calls the function addForm(). But I wasn't able > to figure out I can pass an object of WTreeTableNode along with it.
If you want to connect multiple push buttons to a single slot, each time called with a different extra argument (WTreeTableNode *), then you should use a WSignalMapper<WTreeTableNode *>. See http://www.webtoolkit.eu/wt/wiki/index.php/Frequently_Asked_Questions#Q:_How_do_I_pass_an_additional_argument_from_a_signal_to_a_slot_.3F If you only need this for one button, then the simplest solution is to work with an intermediate method that you connect to the slot which in turn calls addForm() with the correct parent. Regards, koen ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
