title: QTextEdit display width vs text width
body: <p>I'm creating a 'scrolling-text' class in Qt, using a <code>QTextEdit</code> (read-only, no scrollbars, moveCursor) and a <code>QTimer</code> - simple and working.</p>
  
  <p>My problem is when the text sent to the class is shorter (narrower) than the QTextEdit-box.
  Silly, I agree, but, being new to Qt, I didn't find an easy way to compare the width of the given text (depending on the font) and the actual width that can be displayed inside the <code>QTextEdit</code> (after calculating the FrameStyle, etc.). I presume I need to calculate the pixels.</p>
  
  <p>Any ideas?
  Thanks</p>