qt-interest@trolltech.com
[Top] [All Lists]

Re: how to find the caller in a function ?

Subject: Re: how to find the caller in a function ?
From: Niklas Hofmann
Date: Sat, 08 Dec 2007 20:34:48 +0100
If you use the signal/slot mechanism, you can use the function
QObject::sender()

http://doc.trolltech.com/4.3/qobject.html#sender

Greetings

Niklas

Yong Taro schrieb:
> hello,
> 
> having a global function "A()" that will be called by different QObject
> derived objects,
> how in "A()" to get the pointer the QObject* to the caller ?
> 
> is there a way to do this ?
> 
> thanks
> 
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>