mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Python: Expose Slint structs
Structs declared and exported in Slint are now available in the module namespace with a constructor. Fixes #5708
This commit is contained in:
parent
048c0eaf08
commit
1e3f05c983
11 changed files with 144 additions and 12 deletions
|
@ -165,6 +165,12 @@ impl PyStruct {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<slint_interpreter::Struct> for PyStruct {
|
||||
fn from(data: slint_interpreter::Struct) -> Self {
|
||||
Self { data }
|
||||
}
|
||||
}
|
||||
|
||||
#[pyclass(unsendable)]
|
||||
struct PyStructFieldIterator {
|
||||
inner: std::collections::hash_map::IntoIter<String, slint_interpreter::Value>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue