title: qtextedit change font
body: <p>I am using QTextEdit in my project</p>
  
  <p>I want to change the Font of the text edit area when user clicks on a button.
  I am using QTextEdit::setCurrentFont() function for this purpose.
  But, in order to change the font, the user has to first select some text in the textedit area. The font of the whole textedit changes only after selecting some text and then changing the font.</p>
  
  <p>Is there any way to avoid having to select the text to change font? I want the font to change even if the user has not selected any text.</p>
  
  <p>I have also tried this...but, no use..</p>
  
  <pre><code>QTextCharFormat Format = cursor-&gt;charFormat()
  Format.setFontWeight(QFont::Bold);
  cursor-&gt;setCharFormat(Format);
  </code></pre>
  
  <p>Thank you..</p>