Skip to content

StandardPaths

Base classes

Name Children Inherits
QStandardPaths
PySide6.QtCore

⋔ Inheritance diagram

graph TD
  3006902994["core.StandardPaths"]
  2859599669["QtCore.QStandardPaths"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  2859599669 --> 3006902994
  37984305 --> 2859599669
  2751680898 --> 37984305

🛈 DocStrings

Bases: QStandardPaths

Methods for accessing standard paths.

Source code in prettyqt/core/standardpaths.py
class StandardPaths(QtCore.QStandardPaths):
    """Methods for accessing standard paths."""

    @classmethod
    def get_display_name(cls, location: StandardLocationStr) -> str:
        return cls.displayName(STANDARD_LOCATION[location])

    @classmethod
    def get_writable_location(cls, location: StandardLocationStr) -> pathlib.Path | None:
        path = cls.writableLocation(STANDARD_LOCATION[location])
        return pathlib.Path(path) if path else None

    @classmethod
    def get_standard_locations(cls, location: StandardLocationStr) -> list[pathlib.Path]:
        paths = cls.standardLocations(STANDARD_LOCATION[location])
        return [pathlib.Path(p) for p in paths]

:fa-brands-github: Show source on GitHub