Skip to content
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

Support for 'default' properties? #194

Open
DeanThomas1983 opened this issue Apr 22, 2020 · 2 comments
Open

Support for 'default' properties? #194

DeanThomas1983 opened this issue Apr 22, 2020 · 2 comments

Comments

@DeanThomas1983
Copy link

Hi, I've been watching this project for quite a while and it looks like a great solution to cross platform GUIs for C#. One thing I'm particulary interested in is being able to create a generic QML documents for use with C++, Python (PySide2), and C# models.

One thing I've not been able to work out so far with qml.net is if there is support for defining a 'default' property in a C# model. In C++ this would be achieved using:
Q_CLASSINFO("DefaultProperty", "content")

Is there any way to do this currently in qml.net? I'd guess you could use an attribute to define a default property, but wasn't able to see anything within the sources. This seems like a similar open issue: #84

If it isn't currently possible, I'd be interested in giving it a go.

@pauldotknopf
Copy link
Member

pauldotknopf commented Apr 22, 2020

That isn't currently supported.

How would it look? Something like this?

[ClassInfo("Prop", "Value")]
public class NetClass
{
}

@DeanThomas1983
Copy link
Author

Yeah, that was the way I was thinking it could work. I'll look into pulling the code to see if I can work out how it would be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants