Skip to content

PlaceContactDetail

Base classes

Name Children Inherits
QPlaceContactDetail
PySide6.QtLocation
QPlaceContactDetail(self, other: PySide6.QtLocation.QPlaceContactDetail, /, *, label: str | None \= None, value: str | None \= None) -> None

⋔ Inheritance diagram

graph TD
  3137869441["location.PlaceContactDetail"]
  4095558434["QtLocation.QPlaceContactDetail"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  4095558434 --> 3137869441
  37984305 --> 4095558434
  2751680898 --> 37984305

🛈 DocStrings

Bases: QPlaceContactDetail

Represents a contact detail such as a phone number or website url.

Source code in prettyqt/location/placecontactdetail.py
class PlaceContactDetail(QtLocation.QPlaceContactDetail):
    """Represents a contact detail such as a phone number or website url."""

    def __init__(
        self,
        other_or_label: str | QtLocation.QPlaceContactDetail | None = None,
        value: str | None = None,
    ):
        if isinstance(other_or_label, QtLocation.QPlaceContactDetail):
            super().__init__(other_or_label)
        else:
            super().__init__()
            self.setLabel(other_or_label or "")
            self.setValue(value or "")

    def __repr__(self):
        return get_repr(self, self.label(), self.value())

    def __str__(self):
        return f"{self.label()}: {self.value()}"

:fa-brands-github: Show source on GitHub