here is what i have, just doing some test to get familiar with QT Creator. This compiles but when I click one of the buttons the clicked signal does not trigger. Any Ideas?

Qt Code:
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include <QtGui/QMainWindow>
  5. #include <QtGui>
  6. #include <QGridLayout>
  7. #include <QSignalMapper>
  8.  
  9. namespace Ui {
  10. class MainWindow;
  11. }
  12.  
  13. class MainWindow : public QMainWindow
  14. {
  15. Q_OBJECT
  16.  
  17. public:
  18. explicit MainWindow(QWidget *parent = 0);
  19. ~MainWindow();
  20.  
  21. signals:
  22. void clicked(const QString &text);
  23.  
  24. protected:
  25. void changeEvent(QEvent *e);
  26.  
  27. private:
  28. Ui::MainWindow *ui;
  29. QPushButton *theButton;
  30. QGridLayout *theLayout;
  31. QSignalMapper *theMapper;
  32. };
  33.  
  34. #endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include <QDebug>
  4.  
  5.  
  6. MainWindow::MainWindow(QWidget *parent) :
  7. QMainWindow(parent),
  8. ui(new Ui::MainWindow)
  9. {
  10. ui->setupUi(this);
  11.  
  12. theMapper = new QSignalMapper(this);
  13. QGridLayout *theLayout = new QGridLayout();
  14.  
  15. int count = 0;
  16. for (int t = 0; t < 10 ; t++)
  17. {
  18. count++;
  19. QString buttonName;
  20. buttonName.setNum(count);
  21. buttonName.prepend("Sequence");
  22. QPushButton *theButton = new QPushButton(buttonName);
  23. theLayout->addWidget(theButton,count,1,1,1);
  24. connect(theButton, SIGNAL(clicked()), theMapper, SLOT(map()));
  25. theMapper->setMapping(theButton,buttonName);
  26. }
  27.  
  28. centralWidget()->setLayout(theLayout);
  29. connect(theMapper,SIGNAL(mapped(const QString &)),this,SIGNAL(clicked(const QString &)));
  30.  
  31. }
  32.  
  33. void clicked(const QString &text)
  34. {
  35.  
  36. qDebug() << text;
  37. }
  38.  
  39. MainWindow::~MainWindow()
  40. {
  41. delete ui;
  42. }
  43.  
  44. void MainWindow::changeEvent(QEvent *e)
  45. {
  46. QMainWindow::changeEvent(e);
  47. switch (e->type()) {
  48. case QEvent::LanguageChange:
  49. ui->retranslateUi(this);
  50. break;
  51. default:
  52. break;
  53. }
  54. }
To copy to clipboard, switch view to plain text mode