Hi there

I'm having a problem to connect QObjects... I've searched on web a lot and none of the finds seen to help the problem.

I have a class

Qt Code:
  1. class MainWindow : public QMainWindow
  2. {
  3. Q_OBJECT
  4. /* code here */
  5. public slots:
  6. void changeWindow(int);
  7. }
To copy to clipboard, switch view to plain text mode 

another class

Qt Code:
  1. class MainMenu : public QWidget
  2. {
  3. Q_OBJECT
  4. private:
  5. QPushButton *optionsB;
  6. /* code here */
  7. public:
  8. void setup(MainWindow*window);
  9. };
To copy to clipboard, switch view to plain text mode 

where setup have:

Qt Code:
  1. void MainMenu::setup(MainWindow* mainWindow)
  2. {
  3. /* code here */
  4.  
  5.  
  6. QSignalMapper* signalMapper = new QSignalMapper(this);
  7. signalMapper->setMapping(optionsB, int(1));
  8.  
  9. QObject::connect(optionsB, SIGNAL(clicked()),signalMapper, SLOT (map()));
  10. QObject::connect(signalMapper, SIGNAL(mapped(int)), mainWindow, SLOT(changeWindow(int))); // line 50
  11. }
To copy to clipboard, switch view to plain text mode 

And the following runtime error:

Object::connect: No such slot MainWindow::changeWindow(int) in /Users/jorgecarleitao/Trabalho_Outros/qt/teste/mainmenu.cpp:50
Object::connect: (receiver name: 'MainWindow')
Can someone explain to me what is wrong here? I'm 2 days searching for this problem and I can't find the solution...