mirror of
https://github.com/slint-ui/slint.git
synced 2025-12-23 09:19:32 +00:00
Don't use old syntax in docs
This commit is contained in:
parent
4bc741a04c
commit
fd3f974d7e
8 changed files with 23 additions and 23 deletions
|
|
@ -115,7 +115,7 @@ similar to API that's created for your `.slint` component.
|
|||
For example the following `.slint` markup defines a global `Logic` singleton that's also exported:
|
||||
|
||||
```slint,ignore
|
||||
export global Logic := {
|
||||
export global Logic {
|
||||
callback to_uppercase(string) -> string;
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ code.
|
|||
For example, this `struct` in a `.slint` file
|
||||
|
||||
```slint,ignore
|
||||
export struct MyStruct := {
|
||||
export struct MyStruct {
|
||||
foo: int,
|
||||
bar: string,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -729,8 +729,8 @@ public:
|
|||
///
|
||||
/// Example: imagine the .slint file contains the given global:
|
||||
/// ```slint,no-preview
|
||||
/// export global Logic := {
|
||||
/// callback to_uppercase(string) -> string;
|
||||
/// export global Logic {
|
||||
/// pure callback to_uppercase(string) -> string;
|
||||
/// }
|
||||
/// ```
|
||||
/// Then you can set the callback handler
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ as a struct with the same name as the component.
|
|||
For example, if you have
|
||||
|
||||
```slint,no-preview
|
||||
export MyComponent := Window { /*...*/ }
|
||||
export component MyComponent inherits Window { /*...*/ }
|
||||
```
|
||||
|
||||
in the .slint file, it will create a
|
||||
|
|
@ -189,7 +189,7 @@ The follow table summarizes the entire mapping:
|
|||
For user defined structures in the .slint, an extra struct is generated.
|
||||
For example, if the `.slint` contains
|
||||
```slint,ignore
|
||||
export struct MyStruct := {
|
||||
export struct MyStruct {
|
||||
foo: int,
|
||||
bar: string,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue