Document behaviour of globals when exporting multiple components

Fixes #5467
This commit is contained in:
Simon Hausmann 2024-07-16 11:26:45 +02:00 committed by Simon Hausmann
parent 1811832495
commit e36eb6aba6
5 changed files with 17 additions and 2 deletions

View file

@ -155,6 +155,9 @@ export global PrinterJobQueue {
print("job count:", instance.PrinterJobQueue.job_count)
```
**Note**: Global singletons are instantiated once per component. When declaring multiple components for `export` to Python,
each instance will have their own instance of associated globals singletons.
### Setting and Invoking Callbacks
[Callbacks](src/language/syntax/callbacks) declared in `.slint` files are visible as callable properties on the component instance. Invoke them