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¶
- __init__()¶
- __init__(engine, url)
- Parameters:
engine –
QQmlEngineurl – str
- __init__(engine, url)
- Parameters:
engine –
QQmlEngineurl –
QUrl
- clear()¶
- clear(object)
- Parameters:
object –
QObject
- connectDownloadProgress(arg__1, arg__2)¶
- Parameters:
arg__1 –
QObjectarg__2 – str
- Return type:
bool
- connectDownloadProgress(arg__1, arg__2)
- Parameters:
arg__1 –
QObjectarg__2 – int
- Return type:
bool
- connectFinished(arg__1, arg__2)
- Parameters:
arg__1 –
QObjectarg__2 – int
- Return type:
bool
- data()¶
- Return type:
str
- dataByteArray()¶
- Return type:
- error()¶
- Return type:
str
- isError()¶
- Return type:
bool
- isLoading()¶
- Return type:
bool
- 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
- isReady()¶
- Return type:
bool
- static isSynchronous(url)¶
- Parameters:
url – str
- Return type:
bool
- static isSynchronous(url)
- Parameters:
url –
QUrl- Return type:
bool
- load(arg__1, arg__2)¶
- Parameters:
arg__1 –
QQmlEnginearg__2 – str
- load(arg__1, arg__2)
- Parameters:
arg__1 –
QQmlEnginearg__2 –
QUrl
- size()¶
- Return type:
int
- 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