mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #175] How would I access Properties.Settings from QML? #112
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bountifulellie on GitHub (Dec 2, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/175
I've tried registering Properties.Settings as a type, but that didn't work.
@pauldotknopf commented on GitHub (Dec 2, 2019):
I'm not following. Can you post some snippets of what you are doing?
@bountifulellie commented on GitHub (Dec 2, 2019):
OK. In my Program.cs file I have this:
In Main.qml, here's the relevant code:
The error I get after the dialog is closed is as follows:
file:///C:/Users/lempamo/source/repos/lempamo/Soulseek.NET/examples/Desktop/Main.qml:71: TypeError: Cannot read property 'ServerIP' of undefinedServerIP is a setting within Properties.Settings.
@pauldotknopf commented on GitHub (Dec 2, 2019):
Property names are converted to camalCase in QML. Try
default.serverIp.@bountifulellie commented on GitHub (Dec 2, 2019):
Doesn't work, same TypeError as before.
@pauldotknopf commented on GitHub (Dec 2, 2019):
Is
Properties.Settingsnew-able? With no ctor params? What type/visibility is the "Settings" property.You might have to create your own C# class that wraps it. It might be using internal keywords.
@bountifulellie commented on GitHub (Dec 2, 2019):
It is a new-able class with no ctor params, and it is set to public.