Q_GADGET vs an accessor object for manipulating a polymorphic tree of C++ objects from QML
问题 I have a polymorphic tree of C++ types that I need to work with from QML. Memory usage and performance are key here, so I wonder which approach would be more efficient: Q_GADGET - without a doubt the easier and faster way to do it. I can directly use properties (without notifications so no bindings either) and slots to access each object's members. It relies on meta data generation and some kind of object identification in the qtquick runtime. Use an global accessor object for accessing