Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to create property under property ?
zanes last edited by
How do i create a property which is under another property?
please check the sample code below,
May be its not property under property.. its a class and subclass.
Q_PROPERTY(C2 t1 READ t1 NOTIFY elementNameChanged)
Q_PROPERTY(QVariant height READ height NOTIFY elementNameChanged)
import C1 1.0
import C2 1.0
Component.onCompleted:idC2 = idC1.t1
//The above code works fine.
//But i like to have in the Rectangle like this
// what should i need to change to achieve the above way of access ?
andre last edited by
That is only possible, if C1 is a QObject itself.