[Qt-interest] Fixed pitch font

BRM bm_witness at yahoo.com
Mon Feb 15 21:09:20 CET 2010


----- Original Message ----

> What is the most portable way (linux/win/OSX) of requesting a fixed pitch 
> font?
> QFont fixedPitch( "monospace" );
> does not work on OSX.

You have to call setFixedFont(true) on the QFont.
I still can't figure out how to use it on the QLabel though.

QTextFont also has a property for the Fixed Font to be able to set it too, but that doesn't work with the QLabel, just QTextEdit.
I'd still really like to know - especially with respect to QLabel.

Ben





More information about the Qt-interest-old mailing list