[Qt-interest] how can I call a SLOT function and abitrary value parameter.
Bradley T. Hughes
bradley.hughes at nokia.com
Mon Apr 20 11:43:33 CEST 2009
Giancarlo Amati wrote:
> now I to create the signal connection I wrote:
>
> QObject::Connect(Ui.ActionMIP,SIGNAL(triggered()), myWin, SLOT(OpenVR(1)));
> QObject::connect(Ui.ActionCOMPOSITE,SIGNAL(triggerer()),myWin,SLOT(OpenVR(2)));
>
> where OpenVR(int opt) is a slot fuction created in CMainWindows class.
>
> Compilation is OK, but unfortunately the Connect returns error message
> like "OpenVR (2)" doesn't exists. So my question is how can I call a SLOT
> function and passing MY arbitrary value depending on the voice in my
> menu?
QSignalMapper should be able to help you...
--
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway
More information about the Qt-interest-old
mailing list