title: How to set the background color of a tab widget in Qt Creator?
body: <p>I’m using Qt Creator. In my GUI I use a tab widget. This widget should have the same grey background color as the main window (picture A). I accomplished this by editing the Style Sheet in Qt Designer with:</p>
  
  <pre><code>background-colour: rgb(240, 240, 240);
  </code></pre>
  
  <p>But now I have two new problems I can’t solve:</p>
  
  <ul>
  <li>The buttons (--> Send) are not rounded anymore.</li>
  <li>The edit boxes’ background color has changed to grey, too.</li>
  </ul>
  
  <p>Befor I changed the Style Sheet the GUI looked like in Picture B.</p>
  
  <p>I also tried</p>
  
  <pre><code>QPalette pal = m_pUi-&gt;tabWidget-&gt;palette();
  pal.setColor(m_pUi-&gt;tabWidget-&gt;backgroundRole(), Qt::blue);
  m_pUi-&gt;tabWidget-&gt;setPalette(pal);
  </code></pre>
  
  <p>but this only changes the color behind the tabs, not the entire color of the whole "tab-window-surface".</p>
  
  <p>Do I have to make additional style descriptions or is there an more simple solution?</p>
  
  <p><img src="https://i.stack.imgur.com/w1alu.png" alt="Picture A - with Style Sheet"></p>
  
  <p>Picture A - with Style Sheet</p>
  
  <p><img src="https://i.stack.imgur.com/bebr7.png" alt="Picture B - without Style Sheet"></p>
  
  <p>Picture B - without Style Sheet</p>