Your first window
Windows are built with Slint: you design the UI in a .slint file (like WPF’s XAML) and
write the behavior in Rust.
-
Create the project: Nuevo → Aplicación de ventana (window app). It creates
src/main.rsandui/app-window.slintwith a working example. -
Open the designer by clicking
ui/app-window.slint. It opens in Diseño (Design) view. -
Add a button: drag it from the Caja de herramientas (Toolbox) onto the window, and set its text and name in Propiedades (Properties).
-
Handle the click: Eventos (Events) tab → Al hacer clic (On click) → Crear (Create). Raxorin Studio declares the callback in the
.slintfile and writes the handler inmain.rs:src/main.rs ui.on_clear_clicked({let ui_handle = ui.as_weak();move || {let ui = ui_handle.unwrap();// What happens on click.}});