[Qt-interest] customised signals and slots in qt
Brian McKinnon
bpmckinnon.qt at gmail.com
Thu Jul 7 17:21:38 CEST 2011
Your definition of
signal:
in class A should be:
signals:
with an "s".
Thats all I see in the code provided.
Brian!
On Thu, Jul 7, 2011 at 9:22 AM, Sahana Bhaskar
<Sahana_Bhaskar at infosys.com>wrote:
> Hi all,****
>
> ** **
>
> I am trying to implement a customized signal and slot functionality. I have
> 2 classes say A and B. Now on some event (say when a certain method is
> called) I want object of A to send signals to object of B and other objects
> of A itself. I want to know the steps. My IDE is visual studio. Also B is
> derived from QFileDialog. So in essence I have to send a signal from
> object of class A to another class B(a filedialog object).****
>
> ** **
>
> I have done these things so far****
>
> 1) In the header of A(a.h) I have declared the signals as ****
>
> ** **
>
> Class A : public QObject, public<someotherclass>****
>
> {****
>
> ** **
>
> Q_OBJECT****
>
> ...****
>
> ** **
>
> Signal:****
>
> *Void signal1( );*
>
> ** **
>
> }****
>
> ** **
>
> 2) written a connect statement in A.c as:****
>
> ** **
>
> Connect(object_a, SIGNAL( signal1()),object_b, SLOT(slot1()));****
>
> ** **
>
> Void funct()****
>
> {****
>
> *Emit signal1();*
>
> }****
>
> ** **
>
> ** **
>
> 3) defined and declared the slot in B.c and B.h****
>
> ** **
>
> Am I missing something here??****
>
> ** **
>
> Thanks,****
>
> Sahana ****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
> every reasonable precaution to minimize this risk, but is not liable for any damage
> you may sustain as a result of any virus in this e-mail. You should carry out your
> own virus checks before opening the e-mail or attachment. Infosys reserves the
> right to monitor and review the content of all messages sent to or from this e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110707/bb833850/attachment.html
More information about the Qt-interest-old
mailing list