-
Hello there ! I'd like to implement an ephemeral slint window in my rust code. The goal is quite basic : before entering in a processing loop of n items by my rust function, showing a slint window with a progress bar and a text caption (to display the current step name) Then the rust loop starts and at each loop, updates the progressbar and text values. When the loop is over, hide/destroy the window > Done. Here is the rust code :
For the slint part:
So far i'm stuck with this design implementation :
Any ideas about how to get this done properly ? Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Answering to myself 👀 The ìnit`callback is fired when rendering the ui, not after, so it's no the good way to do it. I finally figured out how to make it work. Still not knowing if it is the best way of doing it but it works so...
|
Beta Was this translation helpful? Give feedback.
That looks reasonable. One simplification that you could do is use
Weak::upgrade_in_event_loop()
directly.