Skip to content

Library

Qt Base Class: QLibrary

Signature: QLibrary(self, fileName: str, parent: Optional[PySide6.QtCore.QObject] = None) -> None QLibrary(self, fileName: str, verNum: int, parent: Optional[PySide6.QtCore.QObject] = None) -> None QLibrary(self, fileName: str, version: str, parent: Optional[PySide6.QtCore.QObject] = None) -> None QLibrary(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
ObjectMixin
prettyqt.core.object
QLibrary
PySide6.QtCore
QLibrary(self, fileName: str, parent: Optional[PySide6.QtCore.QObject] \= None) -> None

⋔ Inheritance diagram

graph TD
  1473299908720["core.Library"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473288878352["QtCore.QLibrary"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473299908720
  140713234304496 --> 1473299815024
  1473288878352 --> 1473299908720
  1473288842240 --> 1473288878352
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QLibrary

Loads shared libraries at runtime.

Source code in prettyqt\core\library.py
class Library(core.ObjectMixin, core.QLibrary):
    """Loads shared libraries at runtime."""

    def __bool__(self):
        return self.isLoaded()

    def __repr__(self):
        return get_repr(self, self.fileName())

    def get_load_hints(self) -> list[LoadHintStr]:
        return LOAD_HINTS.get_list(self.loadHints())

    def set_load_hints(self, **kwargs):
        flag = core.QLibrary.LoadHint(0)
        for k, v in kwargs.items():
            if v is True:
                flag |= LOAD_HINTS[k]
        self.setLoadHints(flag)

⌗ Property table

Qt Property Type Doc
objectName QString
fileName QString
loadHints QFlags