title: QT Dialog has incorrect styling
body: <p>I've been trying various methods of creating a new dialog that needs to be spawned from the main application.</p>
  
  <p>I created a designer form, nothing special about it, and placed some stock widgets on it. Once I finally got it to launch from the main application properly, I noticed that the widgets have no styling to them. The buttons have no border or embossing, all text is white, and the background color of the buttons and LineEdit object are gray. The code used to launch the dialog is as follows:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>    UpdateDialog dialog(NULL);
      dialog.setModal(true);
      dialog.exec();
  </code></pre>
  
  <p>I figured maybe it was being inherited from the parent widget, so I passed NULL as the parent in the constructor for the dialog object and it still happened.</p>
  
  <p>I found one answer to a similar question online suggesting that you can override inherited stylesheets from the parent by setting a stylesheet for the dialog that basically just looks like:</p>
  
  <pre class="lang-css prettyprint-override"><code>    #objectName {}
  </code></pre>
  
  <p>But this has no effect.</p>
  
  <p>Styles applied to the widget after creation seem to work, as if I use the following line, the text color on the buttons becomes black:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>    dialog-&gt;setStyleSheet("color: rgb(0,0,0)");
  </code></pre>
  
  <p>Does anyone know what could be causing this behavior? If it matters, we're using Qt 5.6.1 on Scientific Linux (RHEL 6).</p>
  
  <p><strong>EDIT:</strong> Here is a picture of the dialog.</p>
  
  <p><img src="https://i.stack.imgur.com/mQXXb.jpg" alt="Dialog without Styling"></p>
  
  <p>There is supposed to be a LineEdit below the label, as well as a button to the right of it, and then two more buttons beneath the LineEdit. Unfortunately the picture quality doesn't let you see it, but there IS a very faint white text where the buttons are supposed to be, so they ARE there, they're just not styled.</p>
  
  <p><strong>EDIT:</strong> This styling also seems to get applied to the file dialog I spawn from the update dialog seen above.</p>