title: QButtonBox set default button
body: <p>Under Qt 5.3, the default button of a QButtonBox is <code>Cancel</code> and I want to set it to <code>Ok</code> but I can't find a way to achieve it. I've tried this :</p>
  <pre><code>QPushButton * b = ui-&gt;buttonBox-&gt;button(QDialogButtonBox::Ok);
  b-&gt;setDefault(true);
  </code></pre>
  <p>but with no success, it throws :</p>
  <pre><code>/Users/thomas/Dev/Joker/app/Joker/RulerSpaceDialog.cpp:18:3: error: member access into incomplete type 'QPushButton'
          b-&gt;setDefault(true);
           ^
  /Applications/Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qdialog.h:50:7: note: forward declaration of 'QPushButton'
  class QPushButton;
        ^
  1 error generated.
  </code></pre>
  <p>I also try by browsing the list but with no luck....</p>
  <h1>EDIT :</h1>
  <p>I added the include to get that code :</p>
  <pre><code>QPushButton * b = ui-&gt;buttonBox-&gt;button(QDialogButtonBox::Ok);
  if(b)
  {
      b-&gt;setDefault(true);
      qDebug() &lt;&lt; b-&gt;text();
  }
  </code></pre>
  <p>Which outputs <code>Ok</code> waits 2secs then highlight the <code>Cancel</code> button...</p>