-
I'm new to Slint and I'm following the rust tutorial and write some code test state bindings:
The app should change the I'm trying to use Slint for a more complexing application. For example, in the callback, a rust service will pull video frame data streamed from other devices and the data property will change accordingly. Then the slint UI will show different UI content based on the data property as the streaming continues. But I fail in the simple example above. Anyone has any idea about how to make callback and perperty bindings work properly? Thanks in advance. I 've checked the coumentation, the tutorial code and searched for solutions. But I just dont know where the problem is. I've used |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ah that's a small little bug there :-). Change this line: MainWindow::new().unwrap().run().unwrap(); to read app.run().unwrap(); and you'll find that it works :-) The callback that was installed on app was never used because app itself was never used, instead a new instance was created and run. |
Beta Was this translation helpful? Give feedback.
Ah that's a small little bug there :-). Change this line:
to read
and you'll find that it works :-)
The callback that was installed on app was never used because app itself was never used, instead a new instance was created and run.