title: QDialogButtonBox buttons not responding
body: <p>When I run the following function, the dialog shows with everything in place. The problem is that the buttons won't connect. OK and Cancel do not response to mouse clicks.</p>
  
  <pre><code>void MainWindow::initializeBOX(){
  
          QDialog dlg;
          QVBoxLayout la(&amp;dlg);
          QLineEdit ed;
          la.addWidget(&amp;ed);
  
  
          //QDialogButtonBox bb(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
          //btnbox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
           QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |     QDialogButtonBox::Cancel);
  
           connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
           connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  
           la.addWidget(buttonBox);
           dlg.setLayout(&amp;la);
  
  
          if(dlg.exec() == QDialog::Accepted)
          {
              mTabWidget-&gt;setTabText(0, ed.text());
          }
  
        }
  </code></pre>
  
  <p>At runtime, an error in the cmd shows: No such slots as accept() and reject().</p>