title: Show an other form from main form Qt C++
body: <p>i created a form <code>mainwindow</code> class in QT creator, and an action element in a menuBar, and i want that when we click on it, it show an other form called <code>DataWindow</code></p>
  
  <p>Here is my mainwindow.h</p>
  
  <pre><code>private slots:
      void on_actionNouvellesDonnees_clicked();
  </code></pre>
  
  <p>Here is my mainwindow.ccp</p>
  
  <pre><code>void MainWindow::on_actionNouvellesDonnees_clicked() {
      DataWindow w;
      w.show();
  }
  </code></pre>
  
  <p>But when i debug and i click on my action menu, the DataWindow is not showed... and the debug tool said me :</p>
  
  <pre><code>QMetaObject::connectSlotsByName: No matching signal for on_actionNouvellesDonnees_clicked()
  </code></pre>
  
  <p>Thanks for any help !</p>
  
  <p>Complete mainwindow.ccp :</p>
  
  <pre><code>#include &lt;QtGui/QApplication&gt;
  #include &lt;QApplication&gt;
  #include &lt;QMessageBox&gt;
  
  #include "mainwindow.h"
  #include "ui_mainwindow.h"
  #include "datawindow.h"
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      //QObject::connect(ui-&gt;actionNouvellesDonnees, SIGNAL(triggered()), this, SLOT(on_actionNouvellesDonnees_clicked()));
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  void MainWindow::on_actionNouvellesDonnees_triggered() {
  
      DataWindow w;
      w.show();
  }
  </code></pre>
  
  <p>Complete mainwindow.h</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  
  namespace Ui {
  class MainWindow;
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  private slots:
      void on_actionNouvellesDonnees_triggered();
  
  private:
      Ui::MainWindow *ui;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>