HotLoader QML Type
A hot-reloadable loader that watches QML files for changes. More...
| Import Statement: | import FluentUI.Controls 1.0 |
Properties
- item : Item
- source : var
- sourceComponent : Component
- status : enumeration
Detailed Description
HotLoader extends the functionality of a standard loader with file watching capabilities. When the source QML file changes on disk, HotLoader automatically reloads the component, providing a rapid development experience without restarting the application.
Note: Requires the HOTLOAD_ENABLED CMake option to be set to ON.
Usage Example
import QtQuick import FluentUI.Controls HotLoader { source: "qrc:/example/MyComponent.qml" }
Property Documentation
item : Item
The root Item of the loaded component. This property is read-only and provides access to the instantiated object.
source : var
The URL or file path of the QML file to load. When using a local file path rather than a qrc resource, HotLoader watches the file for changes and automatically reloads when modifications are detected.
sourceComponent : Component
The Component to load. Setting this property will replace the source URL and disable file watching behavior.
status : enumeration
The current loading status of the loader. Possible values are: Loader.Null (no source set), Loader.Ready (component loaded), Loader.Loading (component is loading), or Loader.Error (an error occurred).