PySide6.QtQml.QQmlFile

class QQmlFile

The QQmlFile class provides static utility methods to categorize URLs.

Details

QQmlFile provides some static utility methods to categorize URLs and file names the way QQmlEngine does when loading content from them.

Synopsis

Methods

Static functions

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class Status

Constant

Description

QQmlFile.Status.Null

QQmlFile.Status.Ready

QQmlFile.Status.Error

QQmlFile.Status.Loading

__init__()

Note

This function is deprecated.

__init__(engine, url)
Parameters:

Note

This function is deprecated.

__init__(engine, url)
Parameters:

Note

This function is deprecated.

clear()

Note

This function is deprecated.

clear(object)
Parameters:

objectQObject

Note

This function is deprecated.

Redirects to the other clear() overload, ignoring object.

connectDownloadProgress(object, method)
Parameters:
  • objectQObject

  • method – str

Return type:

bool

Note

This function is deprecated.

Connects method of object to the internal downloadProgress signal.

connectDownloadProgress(object, method)
Parameters:
  • objectQObject

  • method – int

Return type:

bool

Note

This function is deprecated.

Connects method of object to the internal downloadProgress signal.

connectFinished(object, method)
Parameters:
  • objectQObject

  • method – str

Return type:

bool

Note

This function is deprecated.

Connects method of object to the internal finished signal.

connectFinished(object, method)
Parameters:
  • objectQObject

  • method – int

Return type:

bool

Note

This function is deprecated.

Connects method of object to the internal finished signal.

data()
Return type:

str

Note

This function is deprecated.

dataByteArray()
Return type:

QByteArray

Note

This function is deprecated.

error()
Return type:

str

Note

This function is deprecated.

isError()
Return type:

bool

Note

This function is deprecated.

isLoading()
Return type:

bool

Note

This function is deprecated.

static isLocalFile(url)
Parameters:

url – str

Return type:

bool

Returns true if url is a local file that can be opened with QFile. Otherwise returns false. Local file urls have either a qrc: or file: scheme.

Note

On Android, urls with assets: or content: scheme are also considered local files.

static isLocalFile(url)
Parameters:

urlQUrl

Return type:

bool

Returns true if url is a local file that can be opened with QFile. Otherwise returns false. Local file urls have either a qrc: or file: scheme.

Note

On Android, urls with assets: or content: scheme are also considered local files.

isNull()
Return type:

bool

Note

This function is deprecated.

isReady()
Return type:

bool

Note

This function is deprecated.

static isSynchronous(url)
Parameters:

url – str

Return type:

bool

static isSynchronous(url)
Parameters:

urlQUrl

Return type:

bool

load(engine, url)
Parameters:

Note

This function is deprecated.

Loads content at url using engine.

load(engine, url)
Parameters:

Note

This function is deprecated.

Loads content at url using engine.

size()
Return type:

int

Note

This function is deprecated.

status()
Return type:

Status

Note

This function is deprecated.

url()
Return type:

QUrl

Note

This function is deprecated.

static urlToLocalFileOrQrc(url)
Parameters:

url – str

Return type:

str

If url is a local file returns a path suitable for passing to QFile. Otherwise returns an empty string.

See also

isLocalFile

static urlToLocalFileOrQrc(url)
Parameters:

urlQUrl

Return type:

str

If url is a local file returns a path suitable for passing to QFile. Otherwise returns an empty string.

See also

isLocalFile