title: How to prevent QPushButton call signal two times?
body: <p>The situation is:
  In the "create course", I click "Save1" Button (time 1 , and it call setUpStep2Action()), It goes to step 2 and disable "Save1" button ... After saving all info, I add more course, so "Save1" Button is enable. And when i click "Save1" Button (time 2), it call setUpStep2Action() 2 times. 
  I dont know what happen and how to prevent this issue.
  Thanks.</p>
  
  <p>void step2SaveAction(int courseId) 
  {</p>
  
  <pre><code>  int numElement = ui.rightWidget-&gt;count();
    if(numElement == 0)
    {
      QMessageBox::warning(this,tr("Skill choice"),tr("Please choose skills!!"));
      return;
    }
  
    char* method = "CREATE";
   if ( courseId !=0)
      method = "EDIT";
  
   setup4Step3(method,courseId,numElement );
   ui.addMoreButton-&gt;setVisible(true);
  </code></pre>
  
  <p>}</p>
  
  <p>I put the connect in the constructor. Here is my code where connect is created:</p>
  
  <pre><code>    QSignalMapper *signalMapper1 = new QSignalMapper(this);
      signalMapper1-&gt;setMapping(ui.courseNameLineEdit,0);
      QObject::connect(ui.courseNameLineEdit,SIGNAL(returnPressed()),signalMapper1, SLOT(map()));
      QObject::connect(signalMapper1, SIGNAL(mapped(int)),this, SLOT(step1SaveAction(int)));
  </code></pre>