QFont

来源:互联网 发布:数据挖掘关联规则算法 编辑:程序博客网 时间:2024/06/05 21:04

Style hints are used by the font matching algorithm to find an appropriate default family if a selected font family is not available.

ConstantValueDescriptionQFont::AnyStyle?leaves the font matching algorithm to choose the family. This is the default.QFont::SansSerifHelveticathe font matcher prefer sans serif fonts.QFont::Helvetica0is a synonym for SansSerif.QFont::SerifTimesthe font matcher prefers serif fonts.QFont::Times?is a synonym for Serif.QFont::TypeWriterCourierthe font matcher prefers fixed pitch fonts.QFont::Courier?a synonym for TypeWriter.QFont::OldEnglish?the font matcher prefers decorative fonts.QFont::DecorativeOldEnglishis a synonym for OldEnglish.QFont::Monospace?the font matcher prefers fonts that map to the CSS generic font-family 'monospace'.QFont::Fantasy?the font matcher prefers fonts that map to the CSS generic font-family 'fantasy'.QFont::Cursive?the font matcher prefers fonts that map to the CSS generic font-family 'cursive'.QFont::System?the font matcher prefers system fonts.

Qt uses a weighting scale from 0 to 99 similar to, but not the same as, the scales used in Windows or CSS. A weight of 0 is ultralight, whilst 99 will be an extremely black.

This enum contains the predefined font weights:

ConstantValueDescriptionQFont::Light2525QFont::Normal5050QFont::DemiBold6363QFont::Bold7575QFont::Black8787
原创粉丝点击