Solved Item and QQuickItem relation
-
Hi All,
In Qt Document, it's mentioned that Item instantiates QQuickItem class. That means Item is an object created from QQuickItem class.
My Question is,
-> If Item is an object of QQuickItem, why does Item has properties such as anchors , whereas QQuickItem does not ?My understanding is, since Item is an object of QQuickItem, Item should have only properties available in QQuickItem.
Please help me understand, what i am missing ...
Thanks in advance
-
You do not see
anchors
property in documentation of QQuickItem, because it is a private property. See the code: https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickitem.h.html#121 So, anchors are there in QQuickItem class, you just don't see them in docs.In practice this is something you don't need to worry about at all - QML engine handles it seamlessly.
-
@sierdzio : Thanks for the reply.