Skip to content

PlaceIcon

Qt Base Class: QPlaceIcon

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

Base classes

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

⋔ Inheritance diagram

graph TD
  1473573466832["location.PlaceIcon"]
  1473573404368["QtLocation.QPlaceIcon"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573404368 --> 1473573466832
  1473291690208 --> 1473573404368
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QPlaceIcon

Represents an icon.

Source code in prettyqt\location\placeicon.py
class PlaceIcon(QtLocation.QPlaceIcon):
    """Represents an icon."""

    def __bool__(self):
        return not self.isEmpty()

    def __setitem__(self, index: str, val: datatypes.Variant):
        attrs = self.parameters()
        attrs[index] = val
        self.setParameters(attrs)

    def __getitem__(self, index: str) -> datatypes.Variant:
        attr = self.parameters()
        if index not in attr:
            raise KeyError(f"Key {index!r} does not exist.")
        return attr[index]

    # def get_manager(self) -> location.PlaceManager:
    #     return location.PlaceManager(self.manager())

    def get_url(self) -> core.Url:
        return core.Url(self.url())