other prelim switching to main.rs

This commit is contained in:
Chris Cochrun 2024-09-25 15:44:36 -05:00
parent 7fd5926fd4
commit e8477a8a19

17
src/rust/main.rs Normal file
View 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();
}
}