Skip to content

PlaceSupplier

Base classes

Name Children Inherits
QPlaceSupplier
PySide6.QtLocation
QPlaceSupplier(self, other: PySide6.QtLocation.QPlaceSupplier, /, *, name: str | None \= None, supplierId: str | None \= None, url: PySide6.QtCore.QUrl | None \= None, icon: PySide6.QtLocation.QPlaceIcon | None \= None) -> None

⋔ Inheritance diagram

graph TD
  904048557["location.PlaceSupplier"]
  256872594["QtLocation.QPlaceSupplier"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  256872594 --> 904048557
  37984305 --> 256872594
  2751680898 --> 37984305

🛈 DocStrings

Bases: QPlaceSupplier

Source code in prettyqt/location/placesupplier.py
class PlaceSupplier(location.QPlaceSupplier):
    def __bool__(self):
        return not self.isEmpty()

    def get_icon(self) -> location.PlaceIcon | None:
        icon = self.icon()
        return None if icon.isEmpty() else location.PlaceIcon(icon)

    def set_url(self, url: datatypes.UrlType):
        url = core.Url(url)
        self.setUrl(url)

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

:fa-brands-github: Show source on GitHub