Replies: 2 comments 4 replies
-
You can send the weak to an different thread, and then use upgrade_in_event_loop. |
Beta Was this translation helpful? Give feedback.
3 replies
-
I can not use 'upgrade_in_event_loop' to update StandardListViewItem, but I have to update the table value, is there any way? main.slintexport global ListViewPageAdapter {
// StandardListView model (in StandardListViewItem): The model
in property <[StandardListViewItem]> list_data: [
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
{text: "Lorem"}, {text: "ipsum"},{text: "dolor"},{text: "sit"},{text: "amet"},{text: "consetetur"},
];
in-out property <[[StandardListViewItem]]> test_data:[
[{text: "Lorem"}, {text: "ipsum"}, {text: "dolor"}, {text: "sit"}],
[{text: "dolor"}, {text: "sit"}, {text: "dolor"}, {text: "sit"}],
];
in property <[[StandardListViewItem]]> disk_info:[
[{text: "Lorem"}, {text: "ipsum"}],
[{text: "dolor"}, {text: "sit"}],
[{text: "amet"}, {text: "consetetur"}],
];
in property <[string]> device_info:[
"Select Something", "Example1", "Example2",
];
in-out property <bool> devicelist;
in-out property <bool> smartbutton;
} main.rstmp_window_weak.upgrade_in_event_loop(move | window | window.global::<ListViewPageAdapter>().set_test_data(row_data.clone().into())); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to update progress in my rust program with a new thread.
But I meet a problem that I can not share the window between the main thread and the son thread. Here is my program.
main.rs
main.slint
Beta Was this translation helpful? Give feedback.
All reactions