Class: CharacterWidget

class qgis.gui.CharacterWidget(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QWidget

Constructor for CharacterWidget.

A widget for displaying characters available in a preset font, and allowing users to select an individual character.

Parameters

parent

actionEvent()
changeEvent()
character(self) → str

Returns the currently selected character in the widget.

See also

setCharacter()

New in version 3.0.

Return type

str

characterSelected

Emitted when a character is selected in the widget. [signal]

Parameters

character (str) –

childEvent()
clearCharacter(self)

Clears the currently selected character in the widget.

See also

character()

See also

setCharacter()

closeEvent()
columns(self) → int

Returns the number of columns of characters shown in the widget.

Return type

int

connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
font(self) → QFont

Returns the font shown in the widget

See also

setFont()

New in version 3.0.

Return type

QFont

hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent(self, event: QKeyEvent)
Parameters

event (QKeyEvent) –

keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mousePressEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent(self, event: QPaintEvent)
Parameters

event (QPaintEvent) –

receivers()
resizeEvent(self, event: QResizeEvent)
Parameters

event (QResizeEvent) –

sender()
senderSignalIndex()
setCharacter(self, character: str)

Sets the currently selected character in the widget.

See also

character()

Parameters

character (str) –

setColumns(self, columns: int)

Sets the number of columns of characters to show in the widget.

New in version 3.0.

Parameters

columns (int) –

setFont(self, font: QFont)

Sets the font to show in the widget.

See also

font()

New in version 3.0.

Parameters

font (QFont) –

setFontSize(self, fontSize: float)

Sets the font size (in points) to render in the widget.

New in version 3.0.

Parameters

fontSize (float) –

setFontStyle(self, fontStyle: str)

Sets the font style to show in the widget.

New in version 3.0.

Parameters

fontStyle (str) –

sharedPainter()
showEvent()
sizeHint(self) → QSize
Return type

QSize

squareSize(self) → int

Returns the size (in pixels) of the square used to render each character preview.

Return type

int

tabletEvent()
timerEvent()
updateFontMerging(self, enable: bool)
Parameters

enable (bool) –

updateMicroFocus()
wheelEvent()