Class: CharacterWidget¶
A widget for displaying characters available in a preset font, and allowing users to select an individual character.
CharacterWidget in a default state¶
Class Hierarchy¶
Base classes¶
- class qgis.gui.CharacterWidget[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None)
Constructor for CharacterWidget.
- Parameters:
parent (Optional[QWidget] = None)
- character(self) str[source]¶
Returns the currently selected character in the widget.
See also
- Return type:
str
- signal characterSelected[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- clearCharacter(self)[source]¶
Clears the currently selected character in the widget.
See also
See also
- columns(self) int[source]¶
Returns the number of columns of characters shown in the widget.
- Return type:
int
- setCharacter(self, character: str)[source]¶
Sets the currently selected
characterin the widget.See also
See also
- Parameters:
character (str)
- setColumns(self, columns: int)[source]¶
Sets the number of columns of characters to show in the widget.
- Parameters:
columns (int)
- setFont(self, font: QFont)[source]¶
Sets the
fontto show in the widget.See also
- Parameters:
font (QFont)
- setFontSize(self, fontSize: float)[source]¶
Sets the font size (in points) to render in the widget.
- Parameters:
fontSize (float)
- setFontStyle(self, fontStyle: str | None)[source]¶
Sets the font style to show in the widget.
- Parameters:
fontStyle (Optional[str])