PySide6.QtQml.QQmlFile¶
- class QQmlFile¶
The
QQmlFileclass provides static utility methods to categorize URLs.Details
QQmlFileprovides some static utility methods to categorize URLs and file names the wayQQmlEnginedoes when loading content from them.Synopsis¶
Methods¶
def
__init__()def
clear()def
data()def
dataByteArray()def
error()def
isError()def
isLoading()def
isNull()def
isReady()def
load()def
size()def
status()def
url()
Static functions¶
def
isLocalFile()def
isSynchronous()
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:
engine –
QQmlEngineurl – str
Note
This function is deprecated.
- __init__(engine, url)
- Parameters:
engine –
QQmlEngineurl –
QUrl
Note
This function is deprecated.
- clear()¶
Note
This function is deprecated.
- clear(object)
- Parameters:
object –
QObject
Note
This function is deprecated.
Redirects to the other clear() overload, ignoring
object.- connectDownloadProgress(object, method)¶
- Parameters:
object –
QObjectmethod – str
- Return type:
bool
Note
This function is deprecated.
Connects
methodofobjectto the internaldownloadProgresssignal.- connectDownloadProgress(object, method)
- Parameters:
object –
QObjectmethod – int
- Return type:
bool
Note
This function is deprecated.
Connects
methodofobjectto the internaldownloadProgresssignal.- connectFinished(object, method)¶
- Parameters:
object –
QObjectmethod – str
- Return type:
bool
Note
This function is deprecated.
Connects
methodofobjectto the internalfinishedsignal.- connectFinished(object, method)
- Parameters:
object –
QObjectmethod – int
- Return type:
bool
Note
This function is deprecated.
Connects
methodofobjectto the internalfinishedsignal.- data()¶
- Return type:
str
Note
This function is deprecated.
- dataByteArray()¶
- Return type:
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
trueifurlis a local file that can be opened with QFile. Otherwise returnsfalse. Local file urls have either aqrc:orfile:scheme.Note
On Android, urls with
assets:orcontent:scheme are also considered local files.- static isLocalFile(url)
- Parameters:
url –
QUrl- Return type:
bool
Returns
trueifurlis a local file that can be opened with QFile. Otherwise returnsfalse. Local file urls have either aqrc:orfile:scheme.Note
On Android, urls with
assets:orcontent: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:
url –
QUrl- Return type:
bool
- load(engine, url)¶
- Parameters:
engine –
QQmlEngineurl – str
Note
This function is deprecated.
Loads content at
urlusingengine.- load(engine, url)
- Parameters:
engine –
QQmlEngineurl –
QUrl
Note
This function is deprecated.
Loads content at
urlusingengine.- size()¶
- Return type:
int
Note
This function is deprecated.
- static urlToLocalFileOrQrc(url)¶
- Parameters:
url – str
- Return type:
str
If
urlis a local file returns a path suitable for passing to QFile. Otherwise returns an empty string.See also
- static urlToLocalFileOrQrc(url)
- Parameters:
url –
QUrl- Return type:
str
If
urlis a local file returns a path suitable for passing to QFile. Otherwise returns an empty string.See also