I have created Buttons dynamically.Now I want to create "click" event on them how can i do that ?
Qt Code:
  1. for(raw=1;raw<=20;raw++)
  2. {
  3. for(clm=1;clm<=5;clm++)
  4. {
  5. QPushButton *pb = new QPushButton();
  6. pb->setIcon(hdd_img);
  7. grid->addWidget(pb,raw,clm,1,1);
  8.  
  9. connect(pb, SIGNAL(clicked()), s_map, SLOT(map()));
  10.  
  11.  
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 
I have tried this but it is not working
I want to show details of some object on that button click and want to access the ID of that button