title: Qt StyleSheet Text Alignment
body: <p>I am trying to change the appearance of a QGroupbox. The problem is about the border of it. After changing the style sheet, the text of the groupbox is not aligned with the border anymore. How can this be solved? </p>
  
  <p>In the first picture, the border is well aligned with the text:</p>
  
  <p><img src="https://s11.postimg.org/5tpepyws3/groupbox2.jpg" alt=""></p>
  
  <p>The style sheet related to this QGroupBox is like this:</p>
  
  <pre><code>QGroupBox{
  background-color: rgb(0,80,120);
  color: white;
  font: 14pt "MS Shell Dlg 2";
  font: bold;
  text-align:center;
  }
  </code></pre>
  
  <p>In the second picture, the border is aligned with the bottom of the text:</p>
  
  <p><img src="https://s11.postimg.org/jonp8fr77/groupbox1.jpg" alt=""></p>
  
  <p>The style sheet related to QGroupBox above is like this:</p>
  
  <pre><code>QGroupBox{
  background-color: rgb(0,80,120);
  color: white;
  font: 14pt "MS Shell Dlg 2";
  font: bold;
  text-align:center;
  border-color: rgb(255,255,255);
  border-width: 2px;
  border-style: solid;
  border-radius: 9px;
  padding: 2px;
  }
  </code></pre>
  
  <p>As you can see, when I add border related parameters, text alignment somehow changes. I want the first style but with the text aligned properly with the border. What is wrong?</p>
  
  <p>Thanks.</p>