Skip to content

PlaceContactDetail

Qt Base Class: QPlaceContactDetail

Signature: QPlaceContactDetail(self) -> None QPlaceContactDetail(self, other: PySide6.QtLocation.QPlaceContactDetail) -> None

Base classes

Name Children Inherits
QPlaceContactDetail
PySide6.QtLocation
QPlaceContactDetail(self) -> None

⋔ Inheritance diagram

graph TD
  1473573465856["location.PlaceContactDetail"]
  1473573359472["QtLocation.QPlaceContactDetail"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573359472 --> 1473573465856
  1473291690208 --> 1473573359472
  140713234304496 --> 1473291690208

🛈 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: None | str | QtLocation.QPlaceAttribute = None,
        value: str | None = None,
    ):
        if isinstance(other_or_label, QtLocation.QPlaceAttribute):
            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()}"