Beginner: Formatting text output (PyQt4)
David Boddie
david at boddie.org.uk
Fri Apr 20 20:54:26 EDT 2007
On Thursday 19 April 2007 00:50, Glen wrote:
> What seems to be happening is that the font that pyqt is using is not
> fixed width, so I did this:
> qTxtFormat = QTextCharFormat()
> qTxtFormat.setFontFixedPitch(True)
> ui.textEdit.setCurrentCharFormat(qTxtFormat)
It may be that the font you're using isn't actually a monospaced font.
The result of this is that the font used to display the text won't be
a fixed pitch font.
To test this, try specifying a known monospaced font and see if you get
the output you expect.
David
More information about the Python-list
mailing list