I am trying to write an app for ubuntu touch and trying to use Rust instead of C++. I'm confused about how you gain access to the qml file fields. Looking for maybe an example of how this is done.
Here is current code:
another_label : qt_method!(fn another_label(&self) {
&self.label2.text = ("hello world").to_string().into();
}),
label2 is a field in the qml file but not part of the rust struct itself so I get error
error[E0070]: invalid left-hand side of assignment
--> src/main.rs:43:27
|
43 | &self.label2.text = ("hello world").to_string().into();
| ----------------- ^
| |
| cannot assign to this expression
error[E0609]: no field label2
on type &Greeter
--> src/main.rs:43:15
|
43 | &self.label2.text = ("hello world").to_string().into();
| ^^^^^^ unknown field
|