Provides utility functions for QML as an attached property.
More...
#include <QmlUtils.h>
|
| | QmlUtilsAttached (QObject *parent=nullptr) |
| |
| auto | themeName () const -> QString |
| |
| auto | fileName () const -> QString |
| |
| Q_INVOKABLE QString | folderName (const QString &path) const |
| |
| Q_INVOKABLE void | adopt (QObject *object) const |
| | Transfers object to the attached object's QObject ownership.
|
| |
|
| QML_ELEMENTQString | themeName |
| | The name of the theme that this QML file belongs to.
|
| |
| QString | fileName |
| | The file name of the QML file that this object is attached to.
|
| |
Provides utility functions for QML as an attached property.
- Note
- Its name in QML is
QmlUtils.
◆ QmlUtilsAttached()
| qml_components::QmlUtilsAttached::QmlUtilsAttached |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ adopt()
| void qml_components::QmlUtilsAttached::adopt |
( |
QObject * |
object | ) |
const |
Transfers object to the attached object's QObject ownership.
- Note
- Does not change a QQuickItem's visual parent.
◆ fileName()
| auto qml_components::QmlUtilsAttached::fileName |
( |
| ) |
const -> QString |
◆ folderName()
| auto qml_components::QmlUtilsAttached::folderName |
( |
const QString & |
path | ) |
const |
◆ qmlAttachedProperties()
| auto qml_components::QmlUtilsAttached::qmlAttachedProperties |
( |
QObject * |
object | ) |
-> QmlUtilsAttached* |
|
static |
◆ themeName()
| auto qml_components::QmlUtilsAttached::themeName |
( |
| ) |
const -> QString |
◆ getThemeNameForRootFile
| std::function<QString(const QUrl&)> qml_components::QmlUtilsAttached::getThemeNameForRootFile |
|
inlinestatic |
◆ fileName
| QString qml_components::QmlUtilsAttached::fileName |
|
read |
The file name of the QML file that this object is attached to.
◆ themeName
| QML_ELEMENTQString qml_components::QmlUtilsAttached::themeName |
|
read |
The name of the theme that this QML file belongs to.
The documentation for this class was generated from the following files: