[Qt-interest] Unknown signal sender
Lucas.Betschart at crypto.ch
Lucas.Betschart at crypto.ch
Thu Sep 1 09:36:42 CEST 2011
Hi,
How can I know which combobox send me the currentIndexChanged signal when I've got an unknown number of dynamic generated comboboxes all with the same Connect?
Is there a way to send the comboboxes name with the signal?
Example:
QList<oneStruct*> structList;
foreach (QString something, bigList){
counter++;
oneStruct *nl = new oneStruct; // Struct
nl->cmbBox = new QComboBox;
connect(lines[counter]->cmbBox,SIGNAL(currentIndexChanged(int)), this, SLOT(function(int)));
structList.append(nl);
}
Thanks.
Regards
Lucas Betschart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110901/26796e08/attachment.html
More information about the Qt-interest-old
mailing list