[Qt-interest] RE : Multiple SIGNALs connected to single SLOT

Sambhav isambhav at gmail.com
Tue Nov 10 19:41:48 CET 2009


Thanks Colin. It worked.
The SIGNAL which the QPushButton was emitting was inherited
from QAbstractButton class. Changing the dynamic_cast to QAbstractButton
worked.


sender() only returns a valid object inside the SLOT() function.
Once the SLOT() function exits sender() returns NULL.

Also, dynamic_cast()<> will either raise an exception or
return NULL if the cast can't be completed due to run-time-type-information.
(i.e. the object is something else derived from QObject, not a QPushButton,
or something derived from QPushButton).

HTH,
Colin S. Miller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091111/0d06e0e5/attachment.html 


More information about the Qt-interest-old mailing list