other prelim switching to main.rs
This commit is contained in:
parent
7fd5926fd4
commit
e8477a8a19
1 changed files with 17 additions and 0 deletions
17
src/rust/main.rs
Normal file
17
src/rust/main.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use cxx_qt_lib::{QGuiApplication, QQmlApplicationEngine, QUrl};
|
||||
pub mod settings;
|
||||
|
||||
fn main() {
|
||||
let mut app = QGuiApplication::new();
|
||||
let mut engine = QQmlApplicationEngine::new();
|
||||
|
||||
if let Some(engine) = engine.as_mut() {
|
||||
engine.load(&QUrl::from(
|
||||
"qrc:/qt/qml/com/cochrun/xyz/qml/main.qml",
|
||||
));
|
||||
}
|
||||
|
||||
if let Some(app) = app.as_mut() {
|
||||
app.exec();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue