1786023101
This commit is contained in:
19
src/main.rs
19
src/main.rs
@@ -1,20 +1,21 @@
|
||||
mod rgba;
|
||||
#[cfg(not(feature = "dev"))]
|
||||
mod trekstor;
|
||||
|
||||
use crate::trekstor::Trekstor;
|
||||
|
||||
slint::include_modules!();
|
||||
|
||||
fn main() -> Result<(), slint::PlatformError> {
|
||||
slint::platform::set_platform(Box::new(Trekstor::new())).expect("set platform");
|
||||
#[cfg(not(feature = "dev"))]
|
||||
slint::platform::set_platform(Box::new(crate::trekstor::Trekstor::new()))
|
||||
.expect("set platform");
|
||||
|
||||
let ui = AppWindow::new()?;
|
||||
let ui = MainWindow::new()?;
|
||||
|
||||
let ui_handle = ui.as_weak();
|
||||
ui.on_request_increase_value(move || {
|
||||
let ui = ui_handle.unwrap();
|
||||
ui.set_counter(ui.get_counter() + 1);
|
||||
});
|
||||
// let ui_handle = ui.as_weak();
|
||||
// ui.on_request_increase_value(move || {
|
||||
// let ui = ui_handle.unwrap();
|
||||
// ui.set_counter(ui.get_counter() + 1);
|
||||
// });
|
||||
|
||||
ui.run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user