-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How would I access Properties.Settings from QML? #175
Comments
I'm not following. Can you post some snippets of what you are doing? |
OK. In my Program.cs file I have this: Qml.Net.Qml.RegisterType<AppModel>("Desktop");
Qml.Net.Qml.RegisterType<Properties.Settings>("Desktop"); In Main.qml, here's the relevant code: AppModel {
id: model
}
Settings {
id: settings
}
Component.onCompleted: {
window.status = "Checking settings..."
if (model.verifySettings()) {
} else {
loginDialog.open() //defined elsewhere, not relevant here
}
window.status = settings.Default.ServerIP
} The error I get after the dialog is closed is as follows: ServerIP is a setting within Properties.Settings. |
Property names are converted to camalCase in QML. Try |
Doesn't work, same TypeError as before. |
Is You might have to create your own C# class that wraps it. It might be using internal keywords. |
It is a new-able class with no ctor params, and it is set to public. |
I've tried registering Properties.Settings as a type, but that didn't work.
The text was updated successfully, but these errors were encountered: