You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You write user interfaces in the Slint language and saved in files with the `.slint` extension.
@@ -343,9 +344,65 @@ The path to each library, as file or directory, must be defined separately at co
343
344
Use one of the following methods to help the Slint compiler resolve libraries to the correct
344
345
path on disk:
345
346
346
-
* When using Rust and `build.rs`, call <LangRefLinklang="rust-slint-build"relpath="struct.CompilerConfiguration#method.with_library_paths">`with_library_paths`</LangRefLink>
347
-
to provide a mapping from library name to path.
348
-
* When using C++, use `LIBRARY_PATHS` with <LangRefLinklang="cpp"relpath="cmake_reference#slint-target-sources">`slint_target_sources`</LangRefLink>.
347
+
<TabssyncKey="dev-language">
348
+
<TabItemlabel="C++">
349
+
* Specify `LIBRARY_PATHS` with <LangRefLinklang="cpp"relpath="cmake_reference#slint-target-sources">`slint_target_sources`</LangRefLink>. For example:
* In `build.rs`, call <LangRefLinklang="rust-slint-build"relpath="struct.CompilerConfiguration#method.with_library_paths">`with_library_paths`</LangRefLink>
362
+
to provide a mapping from library name to path. For example:
* Provide the `libraryPaths` map with <LangRefLinklang="nodejs"relpath="functions/loadFile">`loadFile`</LangRefLink> in `LoadFileOptions`. For example:
380
+
381
+
```javascript
382
+
let ui =slint.loadFile("/path/to/main.slint", {
383
+
libraryPaths: {
384
+
"material":"/path/to/material-1.0/material.slint"
385
+
}
386
+
});
387
+
```
388
+
389
+
</TabItem>
390
+
<TabItemlabel="Python">
391
+
* Provide the `library_paths` dict with <LangRefLinklang="python"relpath="slint#load_file">`load_file`</LangRefLink>. For example:
0 commit comments