Skip to content

DateLabelEventFilter

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
  1473367047216["eventfilters.DateLabelEventFilter"]
  1473367051120["eventfilters.TextUpdateEventFilter"]
  1473367044288["eventfilters.BaseEventFilter"]
  1473299782816["core.Object"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473367051120 --> 1473367047216
  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 DateLabelEventFilter(TextUpdateEventFilter):
    ID = "date_label"

    def __init__(self, parent, date_format: str = "dd.MM.yyyy", **kwargs):
        self._format = date_format
        super().__init__(parent, **kwargs)

    def _update_text(self):
        time = core.Date.get_current_date()
        self.parent().set_text(time.toString(self._format))

⌗ Property table

Qt Property Type Doc
objectName QString