[Qt-interest] Unknown signal sender
Gopalakrishna Bhat
gopalakbhat at gmail.com
Thu Sep 1 09:50:43 CEST 2011
QSignalMapper might be the one you are looking at
On Thu, Sep 1, 2011 at 1:06 PM, <Lucas.Betschart at crypto.ch> wrote:
> 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
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
--
My blog http://gkbhat.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110901/0f7d3027/attachment.html
More information about the Qt-interest-old
mailing list