hi friends,
i try to set the QPushButton() signal clicked() to connect
a slot changeIndex(int)

so i try signal Mapper so i do
mapping .h
Qt Code:
  1. #include <QSignalMapper>
  2.  
  3. signals:
  4. void clicked(int value);
  5.  
  6. public Q_SLOTS:
  7. void changeIndex(int index);
  8.  
  9. private:
  10. QSignalMapper *signalMapper;
  11. int mapValue[10];
To copy to clipboard, switch view to plain text mode 

in mapping.cpp
Qt Code:
  1. /* signal Mapper*/
  2. mapValue[i] = 2;
  3. connect(cicsButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
  4. signalMapper->setMapping(cicsButton, mapValue[1]);
  5.  
  6. connect(signalMapper, SIGNAL(mapped(int)), this, SIGNAL(clicked(int)));
  7. connect(this, SIGNAL(clicked(int)), this, SLOT(changeIndex(int)));
To copy to clipboard, switch view to plain text mode 

it compiled perfectly but when i run core dumped
when i try execute it gives Segmentation fault ....

i dont know where i done the mistake ...it crashes here ..
Qt Code:
  1. connect(cicsButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
To copy to clipboard, switch view to plain text mode 

please help .... why in run time it give seg. fault ....