class QQmlFile#

The QQmlFile class provides static utility methods to categorize URLs. More

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

Detailed Description#

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

class Status#
__init__(engine, url)#
Parameters:
__init__(engine, url)
Parameters:
__init__()
clear()#
clear(object)
Parameters:

objectQObject

connectDownloadProgress(arg__1, arg__2)#
Parameters:
  • arg__1QObject

  • arg__2 – str

Return type:

bool

connectDownloadProgress(arg__1, arg__2)
Parameters:
  • arg__1QObject

  • arg__2 – int

Return type:

bool

connectFinished(arg__1, arg__2)#
Parameters:
  • arg__1QObject

  • arg__2 – str

Return type:

bool

connectFinished(arg__1, arg__2)
Parameters:
  • arg__1QObject

  • arg__2 – int

Return type:

bool

data()#
Return type:

str

dataByteArray()#
Return type:

QByteArray

error()#
Return type:

str

isError()#
Return type:

bool

isLoading()#
Return type:

bool

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

isReady()#
Return type:

bool

static isSynchronous(url)#
Parameters:

url – str

Return type:

bool

static isSynchronous(url)
Parameters:

urlQUrl

Return type:

bool

load(arg__1, arg__2)#
Parameters:
load(arg__1, arg__2)
Parameters:
size()#
Return type:

int

status()#
Return type:

Status

url()#
Return type:

QUrl

static urlToLocalFileOrQrc(arg__1)#
Parameters:

arg__1 – 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(arg__1)
Parameters:

arg__1QUrl

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