I have a QTextEdit
widget whose contents are populated programmatically using QTextEdit.textCursor
.
My plan is to let the user view the populated information in the QTextEdit
, edit the text if necessary, and later print to a PDF file using QPrinter
.
However, I would like to change the font size of the entire contents of the QTextEdit
before allowing the user to edit the text. I just need to set the contents to a single font size; there is no need to accommodate multiple font sizes.
I have tried using QTextEdit.setFontSize(16)
both before and after the textCursor
operation but it doesn't seem to have any effect.
How do I change the font size of the contents of a QTextEdit
widget?