qt - Accessing Structure inside a structure in QML -


previously posted question on how access structures in qml , got perfect answers awesome people , need know there way access structure inside structure in qml, following code :

//mynewstruct

struct mynewstruct {  q_gadget     float m_range;     q_property(float range member m_range) }; 

//mystruct

struct mystruct { q_gadget int m_val; qstring m_name1; qstring m_name2; qstring m_name3; qstring m_name4;  mynewstruct m_newstr; //**new struct declaration  q_property(int val member m_val) q_property(qstring name1 member m_name1) q_property(qstring name2 member m_name2) q_property(qstring name3 member m_name3) q_property(qstring name4 member m_name4)  q_property(mynewstruct newstr member m_newstr) //**currently getting error != cannot used }; 

the error getting in moc due operator "!=" functionality still undefined.

since these kinds of structure definitions required when building complex application/module that's thought of posting question here , there no proper doc available.

coming question: used simple operator loading in struct (since methods allowed here ) following code:

struct mynewstruct {  q_gadget     float m_range;     q_property(float range member m_range)      //overload operator !=     bool operator!=(const mynewstruct & val)     {          //do check local members , return true/false     } }; 

by doing able access mynewstruct in qml.hope helps others.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -