Skip to content

TimeLabelEventFilter

Qt Base Class: QObject

Signature: QObject(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
TextUpdateEventFilter
prettyqt.eventfilters.timelabeleventfilter

⋔ Inheritance diagram

graph TD
  1473367062832["eventfilters.TimeLabelEventFilter"]
  1473367051120["eventfilters.TextUpdateEventFilter"]
  1473367044288["eventfilters.BaseEventFilter"]
  1473299782816["core.Object"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473367051120 --> 1473367062832
  1473367044288 --> 1473367051120
  1473299782816 --> 1473367044288
  1473299815024 --> 1473299782816
  140713234304496 --> 1473299815024
  1473288842240 --> 1473299782816
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: TextUpdateEventFilter

Source code in prettyqt\eventfilters\timelabeleventfilter.py
class TimeLabelEventFilter(TextUpdateEventFilter):
    ID = "time_label"

    def __init__(self, parent, time_format: str = "hh:mm:ss", **kwargs):
        self._format = time_format
        super().__init__(parent, **kwargs)

    def _update_text(self):
        time = core.Time.get_current_time()
        self.parent().set_text(time.toString(self._format))

⌗ Property table

Qt Property Type Doc
objectName QString