QFontComboBoxwidget is a combobox that lets the user select a font family. 更多 …
def
currentFont
()
def
fontFilters
()
def
setFontFilters
(filters)
def
setWritingSystem
(arg__1)
def
writingSystem
()
def
setCurrentFont
(f)
def
currentFontChanged
(f)
The combobox is populated with an alphabetized list of font family names, such as Arial, Helvetica, and Times New Roman. Family names are displayed using the actual font when possible. For fonts such as Symbol, where the name is not representable in the font itself, a sample of the font is displayed next to the family name.
QFontComboBoxis often used in toolbars, in conjunction with aQComboBoxfor controlling the font size and twoQToolButtons for bold and italic.When the user selects a new font, the
currentFontChanged()signal is emitted in addition tocurrentIndexChanged().调用
setWritingSystem()to tellQFontComboBoxto show only fonts that support a given writing system, andsetFontFilters()to filter out certain types of fonts as e.g. non scalable fonts or monospaced fonts.![]()
QFontComboBox
(
[
parent=None
]
)
¶
- param parent
Constructs a font combobox with the given
parent
.
PySide2.QtWidgets.QFontComboBox.
FontFilter
¶
This enum can be used to only show certain types of fonts in the font combo box.
|
常量 |
描述 |
|---|---|
|
QFontComboBox.AllFonts |
Show all fonts |
|
QFontComboBox.ScalableFonts |
Show scalable fonts |
|
QFontComboBox.NonScalableFonts |
Show non scalable fonts |
|
QFontComboBox.MonospacedFonts |
Show monospaced fonts |
|
QFontComboBox.ProportionalFonts |
Show proportional fonts |
PySide2.QtWidgets.QFontComboBox.
currentFont
(
)
¶
QFont
另请参阅
PySide2.QtWidgets.QFontComboBox.
currentFontChanged
(
f
)
¶
f
–
QFont
PySide2.QtWidgets.QFontComboBox.
fontFilters
(
)
¶
FontFilters
另请参阅
PySide2.QtWidgets.QFontComboBox.
setCurrentFont
(
f
)
¶
f
–
QFont
另请参阅
PySide2.QtWidgets.QFontComboBox.
setFontFilters
(
filters
)
¶
filters
–
FontFilters
另请参阅
PySide2.QtWidgets.QFontComboBox.
setWritingSystem
(
arg__1
)
¶
arg__1
–
WritingSystem
另请参阅
PySide2.QtWidgets.QFontComboBox.
writingSystem
(
)
¶
WritingSystem
另请参阅