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

Giancarlo Amati ilferraresebono at hotmail.it
Mon Apr 20 11:49:23 CEST 2009


Well...I think so it is like this:



class CMainWindow: public QMainWindow {



Q_OBJECT;



public:

private:



public slot:



}

GC

Date: Mon, 20 Apr 2009 10:36:27 +0100
From: donaloconnor at gmail.com
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] how can I call a SLOT function and abitrary value	parameter.

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

_______________________________________________

Qt-interest mailing list

Qt-interest at trolltech.com

http://lists.trolltech.com/mailman/listinfo/qt-interest




_________________________________________________________________
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/84a94197/attachment.html 


More information about the Qt-interest-old mailing list