<> sketch
QFont Font setting is nothing more than setting the following parameters :
<>QFont Common properties
setFamily Set font
setPixelSize Set font pixel size
setBold Bold font
setItalic Italics
setPointSize Set font size
setOverline Upper scribe
setUnderline Underline
setStrikeOut Delete line
<> Set the difference between font size and pixel size
setPixelSize() Function use Sets the font size in pixels
setPointSize() The function specifies that we Font size visible to the naked eye , Pixel independent
use setPixelSize Function set size , The display size is different on devices with different pixel sizes
use setPointSize Function set size , The size displayed on different devices is the same
<>QFont Derived
QFont Provide a specified font for drawing text
QFontComboBox Provides a drop-down list box for selecting a font family
QFontDatabase Provides the ability to Window Fonts that can be used under the operating system
QFontDialog Used to select a specified font
QFontEngineInfo Used to describe a specified font engine plug-in
QFontEnginePlugin It provides the basis of font warehouse plug-in , For embedded linux
QFontInfo Contains general information about a font
QFontDialog Used to pop up a dialog box To get the specified font
<> Common fonts
( Do not know the style can be in ui View the style of the corresponding font in the font settings of )
Song style SimSun
Blackbody SimHei
Microsoft YaHei Microsoft YaHei
Microsoft JhengHei Microsoft JhengHei
NSimSun NSimSun
Xinximing body PMingLiU
Fine bright body MingLiU
DFKai-SB DFKai-SB
Imitation Song Dynasty FangSong
Regular script KaiTi
Imitation Song Dynasty _GB2312 FangSong_GB2312
Regular script _GB2312 KaiTi_GB2312
Song style :SimSuncss Chinese font (font-family) English name of
<>Mac OS Some of :
Chinese fine black :STHeiti Light [STXihei]
Chinese bold :STHeiti
Chinese regular script :STKaiti
Chinese Song typeface :STSong
Chinese imitation Song Dynasty :STFangsong
Li Hei Pro:LiHei Pro Medium
Li Song Pro:LiSong Pro Light
dfkai-sb :BiauKai
apple ligothic medium :Apple LiGothic Medium
Apple LiSung Light :Apple LiSung Light
<>Windows Some of :
Xinximing body :PMingLiU
Fine bright body :MingLiU
dfkai-sb :DFKai-SB
Blackbody :SimHei
NSimSun :NSimSun
Imitation Song Dynasty :FangSong
Regular script :KaiTi
Imitation Song Dynasty _GB2312:FangSong_GB2312
Regular script _GB2312:KaiTi_GB2312
microsoft jhenghei :Microsoft JhengHei
microsoft yahei :Microsoft YaHei
<> pretend Office Some will come out :
official script :LiSu
Immature :YouYuan
Chinese fine black :STXihei
Chinese regular script :STKaiti
Chinese Song typeface :STSong
Chinese song :STZhongsong
Chinese imitation Song Dynasty :STFangsong
Fangzheng shutI :FZShuTi
Fangzheng yaoti :FZYaoti
Hua wencaiyun :STCaiyun
Chinese Amber :STHupo
Chinese official script :STLiti
Chinese block letters :STXingkai
Hua Wenxin Wei :STXinwei
<> Examples
#include<QFont> Font class , By setting QFont Type of , To change the attributes of text in batch ; Here with QLineEdit Input box as an example QFont Usage of ;
QFont font;// instantiation QFont object //font.setFamily(" Microsoft YaHei ");// typeface
//font.setPixelSize(25);// Text pixel size //font.setPointSize(20);// Text size
//font.setUnderline(true);// Underline //font.setStrikeOut(true);// strikethrough
//font.setOverline(true);// Upper scribe //font.setItalic(true);// Italics
//font.setBold(true);// bold // font.setStyle(QFont::StyleOblique); //
font.setCapitalization(QFont::Capitalize);// title case //
font.setLetterSpacing(QFont::PercentageSpacing,200);// spacing QLineEdit*p=new
QLineEdit(this); p->resize(300,100); p->move(0,100); p->setFont(font);
Technology
Daily Recommendation