title: Center the Text of QTextEdit horizontally and vertically
body: <p>I want to center the text of my QTextEdit horizontally and vertically.</p>
  
  <p>I tried this, but it didn't work.</p>
  
  <pre><code>m_myTextEdit = new QTextEdit("text edit", m_ui-&gt;centralWidget);
  m_myTextEdit-&gt;setGeometry(5, 50, 400, 250);
  m_myTextEdit-&gt;setReadOnly(true);
  m_myTextEdit-&gt;setAlignment(Qt::AlignCenter);
  </code></pre>
  
  <p>Is there a opportunity to set it centered with a StyleSheet?</p>