mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
Document behaviour of globals when exporting multiple components
Fixes #5467
This commit is contained in:
parent
1811832495
commit
e36eb6aba6
5 changed files with 17 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue