A path to the file to load. If the path is a relative path, then it is resolved against the process' working directory.
Optional
options: LoadFileOptionsUse LoadFileOptions to configure additional Slint compilation aspects, such as include search paths, library imports, or the widget style.
The returned object is sealed and provides a property by the name of the component exported
in the .slint
file. In the above example the name of the property is Main
. The property
is a constructor function. Use it with the new operator to instantiate the component.
The instantiated object exposes properties and callbacks, and implements the ComponentHandle interface.
For more details about the exposed properties, see Instantiating A Component.
CompileError if errors occur during compilation.
Loads the given Slint file and returns an objects that contains a functions to construct the exported component of the slint file.
The following example loads a "Hello World" style Slint file and changes the Text label to a new greeting:
main.slint
: