[Qt-interest] Unknown signal sender
Tony Rietwyk
tony.rietwyk at rightsoft.com.au
Thu Sep 1 15:17:48 CEST 2011
Hi Lucas,
Have a look at QObject.sender(), QObject.objectName() and QObject.connect().
The documentation is correct. The example is a custom widget that emits its
own signal, and it connects them directly.
In your case, you wanted to consume the signal, so you used a slot.
Hope that helps,
Tony.
Sent: Thursday, 1 September 2011 10:39 PM
Thanks, that worked.
Btw, I think the documentation example from QSignaleMapper is wrong.
connect(signalMapper, SIGNAL(mapped(const QString &)),
this, SIGNAL(clicked(const QString &)));
Shouldnt this be SLOT at the second line?
connect(signalMapper, SIGNAL(mapped(const QString &)),
this, SLOT(clicked(const QString &)));
Atleast thats the way it worked for me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110901/85c00371/attachment.html
More information about the Qt-interest-old
mailing list