[Qt-interest] how can I call a SLOT function and abitrary value parameter.

Donal O'Connor donaloconnor at gmail.com
Mon Apr 20 11:36:27 CEST 2009


Have you the Q_OBJECT marco defined in the private section of your class
definition?



On Mon, Apr 20, 2009 at 10:30 AM, Giancarlo Amati <
ilferraresebono at hotmail.it> wrote:

>  Hello everybody,
>
> I made my GUI in which I have a main menu. One of the voices has 2 possible
> suboptions to be chosen:
>
> VolumeRendering ---> MIP
>                          |__>COMPOSITE VR
>
>
> so I created the correspondent Actions and then I have my CMainWindows
> class derived from a QMainWindow where I added one slot:
>
> OpenVR(int opt) where I would OPT be 1 if MIP is chosen, or 2 if
> COMPOSITE_VR is Chosen.
>
> 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?
>
> Kind Regards.
>
>
> ------------------------------
> 25 GB di spazio gratuito su Internet! Prova SkyDrive<http://clk.atdmt.com/GBL/go/140630366/direct/01/>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/539b4a7c/attachment.html 


More information about the Qt-interest-old mailing list