You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using Slint with Rust in both RustRover and VSCode, in W10 and I have the same problem.
There's no way I can get my global export in scope from Rust.
I tried declaring it in a single file, in the main Slint file and in the macro slint::slint!, but had no results.
I also tried deleting the export and re-importing in all possible orders but still can't make it work.
I can call my global from other slint files, the problem is to call it from Rust.
` slint::include_modules!();
slint::slint!{
export global Logic := {
callback pagar(int,int);
}
}
mod db;
mod mods;
fn main()->Result<(),slint::PlatformError> {
let ui = AppWindow::new()?;
let ui_handle = ui.as_weak();
ui.global::(); //<-- here's the problem
ui.on_request_increase_value(move || {
let ui= ui_handle.unwrap();
ui.set_counter(ui.get_counter() + 1);
});
ui.run()
}`
The text was updated successfully, but these errors were encountered:
I had tried, but it was the same, so I kept trying and it turned out to be that I had changed the directory of the project just copying and pasting the files. Then the compiler stopped adding changes to the target folder. Thanks a lot for your help!
Hi, I'm using Slint with Rust in both RustRover and VSCode, in W10 and I have the same problem.
There's no way I can get my global export in scope from Rust.
I tried declaring it in a single file, in the main Slint file and in the macro slint::slint!, but had no results.
I also tried deleting the export and re-importing in all possible orders but still can't make it work.
I can call my global from other slint files, the problem is to call it from Rust.
` slint::include_modules!();
slint::slint!{
export global Logic := {
callback pagar(int,int);
}
}
mod db;
mod mods;
fn main()->Result<(),slint::PlatformError> {
let ui = AppWindow::new()?;
let ui_handle = ui.as_weak();
ui.global::(); //<-- here's the problem
ui.on_request_increase_value(move || {
let ui= ui_handle.unwrap();
ui.set_counter(ui.get_counter() + 1);
});
ui.run()
}`
The text was updated successfully, but these errors were encountered: