How to specify monospace fonts for cross platform Qt applications?

后端 未结 4 1882
夕颜
夕颜 2020-12-05 08:57

Is there a platform independent way to specify a fixed width font for a Qt widget ?

If I set the font to \"Monospace\" in Designer on Linux, it is not found on Windo

4条回答
  •  没有蜡笔的小新
    2020-12-05 09:52

    For all widgets that accept Rich Text you can simply put it into a pre block, i.e.

    This is my Text
    . It will then use the systems monospace font.

提交回复
热议问题