How set organization name and application values? #940
-
use cxx_qt_lib::{QGuiApplication, QQmlApplicationEngine, QUrl};
mod cxxqt_object;
fn main() {
// Create the application and engine
let mut app = QGuiApplication::new();
let mut engine = QQmlApplicationEngine::new();
app.set_application_version("0.1,0");
app.set_organization_name("org");
app.set_organization_domain("domain");
// Load the QML path into the engine
if let Some(engine) = engine.as_mut() {
engine.load(&QUrl::from("qml/main.qml"));
}
// Start the app
if let Some(app) = app.as_mut() {
app.exec();
}
} I see errors like How do I set those values if instance of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
So if let Some(app) = app.as_mut() {
app.set_application_version(&QString::from("0.1.0"));
app.organization_name(&QString::from("org"));
app.organization_domain(&QString::from("domain"));
} |
Beta Was this translation helpful? Give feedback.
Ah yes you'll hit the move fun, add some
as_mut()
's in there and it'll work.