You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would be an awesome add! I think its implementation should be straightforward as well.
public class QmlProperty
{
// PInvoke for QQmlProperty: http://doc.qt.io/qt-5/qqmlproperty.html
}
public interface IQmlPropertyValueSource
{
void setTarget(QmlProperty target);
}
public class MyNetObject : IQmlPropertyValueSource
{
private QmlProperty _target;
public MyNetObject()
{
// Maybe create a timer to update the "_target" (if not null)
// at periodic intervals?
}
public void setTarget(QmlProperty target)
{
_target = target;
}
}
Then, we'd add the QQmlPropertyValueSource base to the existing NetValue (here) type, which will implement the QQmlPropertyValueSource::setTarget(QQmlProperty) method and send it to .NET.
We'd also have to extend the NetTypeInfo (here) to have a bool IsPropertyValueSource that will be used in NetValue to log if someone is trying to use .NET Object as a value source and it doesn't implement the required IQmlPropertyValueSource .NET interface.
I'm marking this issue as "todo", as I will likely implement it at some point in the future.
However, I'm open to pull requests. I think this would be perfect for new comers. It's not too big of a change and it exposes you to a comfortable amount of the internals.
Hi
How can I help with implementing this?
http://doc.qt.io/qt-5/qtqml-cppintegration-definetypes.html#property-value-sources
The text was updated successfully, but these errors were encountered: