Global stylesheet isn't fully working
<p>I'm trying to set a global stylesheet for all my buttons.
Doing it for a specific button like the following, works as expected:</p>

<pre><code>button-&gt;setStyleSheet(QString("QPushButton:focus {") +
                                  "outline: 0;" +
                                  "background-color: #" + BUTTON_HIGHLIGHT_BG_COLOR  + "; " +
                                  "color: #"            + BUTTON_HIGHLIGHT_TXT_COLOR + "; " +
                              "}"
                     );
</code></pre>

<p>But if I make it global, like this:</p>

<pre><code>qApp-&gt;setStyleSheet(QString("QPushButton:focus {") +
                                  "outline: 0;" +
                                  "background-color: #" + BUTTON_HIGHLIGHT_BG_COLOR  + "; " +
                                  "color: #"            + BUTTON_HIGHLIGHT_TXT_COLOR + "; " +
                            "}"
                   );
</code></pre>

<p>the focused buttons get the correct font color, but they don't seem to have a background (although the background I'm setting for them is different from the main layout's background.)</p>

<p><code>BUTTON_HIGHLIGHT_BG_COLOR</code> and <code>BUTTON_HIGHLIGHT_TXT_COLOR</code> are strings for colors (e.g. "FF0000")</p>

<p>What could be the cause that it works for a specific widget, but fails globally?</p>

<p><strong>update:</strong></p>

<p>I followed @ThorngardSO's answer and finally solved it by changing:</p>

<pre><code>stackedWidget-&gt;setStyleSheet("background-color: white;");
</code></pre>

<p>to:</p>

<pre><code>stackedWidget-&gt;setStyleSheet("QStackedWidget { background-color: white; }");
</code></pre>

<p>which was in the loading screen (first screen)</p>