The Slint source code to load.
A path to the file to show log. 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 source code and returns an object that contains a function to construct the exported component of the Slint source code.
The following example loads a "Hello World" style Slint source code and changes the Text label to a new greeting: