FontMetricsF
Base classes
| Name |
Children |
Inherits |
QFontMetricsF PySide6.QtGui QFontMetricsF(self, arg__1: PySide6.QtGui.QFontMetrics, /) -> None |
|
|
⋔ Inheritance diagram
graph TD
592431949["gui.FontMetricsF"]
731231991["QtGui.QFontMetricsF"]
37984305["Shiboken.Object"]
2751680898["builtins.object"]
731231991 --> 592431949
37984305 --> 731231991
2751680898 --> 37984305
🛈 DocStrings
Bases: QFontMetricsF
Font metrics information.
Source code in prettyqt/gui/fontmetricsf.py
| class FontMetricsF(QtGui.QFontMetricsF):
"""Font metrics information."""
def elided_text(
self,
text: str,
mode: constants.TextElideModeStr | constants.TextElideMode,
width: float,
flags=0,
) -> str:
val = constants.TEXT_ELIDE_MODE.get_enum_value(mode)
return self.elidedText(text, val, width, flags)
def get_bounding_rect(self, *args) -> core.RectF:
return core.RectF(self.boundingRect(*args))
def get_tight_bounding_rect(self, text: str) -> core.RectF:
return core.RectF(self.tightBoundingRect(text))
|
:fa-brands-github: Show source on GitHub