Skip to content

PythonQt.QtCore.QResource · declarations 001

Back to PythonQt.QtCore.QResource

absoluteFilePath

absoluteFilePath() -> str

X.absoluteFilePath() -> str

Supplemental documentation: Qt 5 reference:

QString QResource::absoluteFilePath() const

Returns the real path that this QResource represents, if the resource was found via the QDir::searchPaths() it will be indicated in the path.

See also fileName().

Upstream PySide2 reference signatures (binding differences may apply):

absoluteFilePath(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#absoluteFilePath

addSearchPath

addSearchPath(path: str) -> None

X.addSearchPath(path)

Upstream PySide2 reference signatures (binding differences may apply):

addSearchPath(path: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#addSearchPath

children

children() -> tuple

X.children() -> tuple

Supplemental documentation: Qt 5 reference:

[protected] QStringList QResource::children() const

Returns a list of all resources in this directory, if the resource represents a file the list will be empty.

See also isDir().

Upstream PySide2 reference signatures (binding differences may apply):

children(self) -> typing.List[str]

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#children

data

data() -> str

X.data() -> int

Supplemental documentation: Qt 5 reference:

const uchar *QResource::data() const

Returns direct access to a segment of read-only data, that this resource represents. If the resource is compressed, the data returned is also compressed. The caller must then decompress the data or use uncompressedData(). If the resource is a directory, nullptr is returned.

See also uncompressedData(), size(), and isFile().

Upstream PySide2 reference signatures (binding differences may apply):

data(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#data

fileName

fileName() -> str

X.fileName() -> str

Supplemental documentation: Qt 5 reference:

QString QResource::fileName() const

Returns the full path to the file that this QResource represents as it was passed.

See also setFileName() and absoluteFilePath().

Upstream PySide2 reference signatures (binding differences may apply):

fileName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#fileName

isCompressed

isCompressed() -> bool

X.isCompressed() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

isCompressed(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#isCompressed

isDir

isDir() -> bool

X.isDir() -> bool

Supplemental documentation: Qt 5 reference:

[protected] bool QResource::isDir() const

Returns true if the resource represents a directory and thus may have children() in it, false if it represents a file.

See also isFile().

Upstream PySide2 reference signatures (binding differences may apply):

isDir(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#isDir

isFile

isFile() -> bool

X.isFile() -> bool

Supplemental documentation: Qt 5 reference:

[protected] bool QResource::isFile() const

Returns true if the resource represents a file and thus has data backing it, false if it represents a directory.

See also isDir().

Upstream PySide2 reference signatures (binding differences may apply):

isFile(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#isFile

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QResource::isValid() const

Returns true if the resource really exists in the resource hierarchy, false otherwise.

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#isValid

locale

locale() -> Any

X.locale() -> PythonQt.QtCore.QLocale

Supplemental documentation: Qt 5 reference:

QLocale QResource::locale() const

Returns the locale used to locate the data for the QResource.

See also setLocale().

Upstream PySide2 reference signatures (binding differences may apply):

locale(self) -> PySide2.QtCore.QLocale

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#locale

registerResource

registerResource(rccFilename: str, resourceRoot: str) -> bool

X.registerResource(rccFilename, resourceRoot) -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QResource::registerResource(const QString \&rccFileName, const QString \&mapRoot \= QString())

Registers the resource with the given rccFileName at the location in the resource tree specified by mapRoot, and returns true if the file is successfully opened; otherwise returns false.

See also unregisterResource().

[static] bool QResource::registerResource(const uchar *rccData, const QString \&mapRoot \= QString())

Registers the resource with the given rccData at the location in the resource tree specified by mapRoot, and returns true if the file is successfully opened; otherwise returns false.

Warning: The data must remain valid throughout the life of any QFile that may reference the resource data.

This function was introduced in Qt 4.3.

See also unregisterResource().

Upstream PySide2 reference signatures (binding differences may apply):

registerResource(rccFilename: str, resourceRoot: str=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#registerResource

searchPaths

searchPaths() -> tuple

X.searchPaths() -> tuple

Upstream PySide2 reference signatures (binding differences may apply):

searchPaths() -> typing.List[str]

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#searchPaths

setFileName

setFileName(file: str) -> None

X.setFileName(file)

Supplemental documentation: Qt 5 reference:

void QResource::setFileName(const QString \&file)

Sets a QResource to point to file. file can either be absolute, in which case it is opened directly, if relative then the file will be tried to be found in QDir::searchPaths().

See also fileName() and absoluteFilePath().

Upstream PySide2 reference signatures (binding differences may apply):

setFileName(self, file: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#setFileName

setLocale

setLocale(locale: Any) -> None

X.setLocale(locale)

Supplemental documentation: Qt 5 reference:

void QResource::setLocale(const QLocale \&locale)

Sets a QResource to only load the localization of resource to for locale. If a resource for the specific locale is not found then the C locale is used.

See also locale() and setFileName().

Upstream PySide2 reference signatures (binding differences may apply):

setLocale(self, locale: PySide2.QtCore.QLocale) -> None

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#setLocale

size

size() -> int

X.size() -> int

Supplemental documentation: Qt 5 reference:

qint64 QResource::size() const

Returns the size of the stored data backing the resource.

If the resource is compressed, this function returns the size of the compressed data. See uncompressedSize() for the uncompressed size.

See also data(), uncompressedSize(), and isFile().

Upstream PySide2 reference signatures (binding differences may apply):

size(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#size

unregisterResource

unregisterResource(rccFilename: str, resourceRoot: str) -> bool

X.unregisterResource(rccFilename, resourceRoot) -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QResource::unregisterResource(const QString \&rccFileName, const QString \&mapRoot \= QString())

Unregisters the resource with the given rccFileName at the location in the resource tree specified by mapRoot, and returns true if the resource is successfully unloaded and no references exist for the resource; otherwise returns false.

See also registerResource().

[static] bool QResource::unregisterResource(const uchar *rccData, const QString \&mapRoot \= QString())

Unregisters the resource with the given rccData at the location in the resource tree specified by mapRoot, and returns true if the resource is successfully unloaded and no references exist into the resource; otherwise returns false.

This function was introduced in Qt 4.3.

See also registerResource().

Upstream PySide2 reference signatures (binding differences may apply):

unregisterResource(rccFilename: str, resourceRoot: str=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qresource.html#unregisterResource