[Qt-interest] signal mapping on pushbutton signal clicked
Srdjan Todorovic
todorovic.s at googlemail.com
Tue Mar 17 11:42:10 CET 2009
Hi,
2009/3/17 chandrasekar wagmare <sekarwagmare at gmail.com>:
> QSignalMapper *signalMapper;
>
> in mapping.cpp
>
> /* signal Mapper*/
>
> mapValue[i] = 2;
> connect(cicsButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
>
> signalMapper->setMapping(cicsButton, mapValue[1]);
>
> connect(signalMapper, SIGNAL(mapped(int)), this,
> SIGNAL(clicked(int)));
>
> connect(this, SIGNAL(clicked(int)), this, SLOT(changeIndex(int)));
>
> int mapValue[10];
>
> it compiled perfectly but when i run core dumped
> when i try execute it gives Segmentation fault ....
>
> i dont know where i d
>
> connect(cicsButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
>
> please help .... why in run time it give seg. fault ....
I suggest you start here:
http://en.wikipedia.org/wiki/Segfault
Then web-search for how to debug segfaults. There are going to be
*many* resources for this.
Hope that helps,
Srdjan
More information about the Qt-interest-old
mailing list