mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
C++: move globals in a different struct
So that subcomponent don't depend on the root component name which will hallow to have several root components
This commit is contained in:
parent
b7478bb88c
commit
d0cdebfee6
2 changed files with 136 additions and 95 deletions
|
|
@ -99,11 +99,10 @@ public:
|
|||
cbindgen_private::slint_windowrc_set_focus_item(&inner, &item_rc, set_focus);
|
||||
}
|
||||
|
||||
template<typename Component>
|
||||
void set_component(const Component &c) const
|
||||
void set_component(const cbindgen_private::ItemTreeWeak &weak) const
|
||||
{
|
||||
auto self_rc = (*c.self_weak.lock()).into_dyn();
|
||||
slint_windowrc_set_component(&inner, &self_rc);
|
||||
auto item_tree_rc = (*weak.lock()).into_dyn();
|
||||
slint_windowrc_set_component(&inner, &item_tree_rc);
|
||||
}
|
||||
|
||||
template<typename Component, typename Parent>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue