Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Getting the list of methods of QmlDesigner::ModelNode from Qt Creator plugin
dzimiwine last edited by dzimiwine
I am creating a QtCreator plugin for QmlDesigner which needs to get the list of methods (and signals) of selected objects. I am looking at the ModelNode and NodeMetaInfo classes but I don't see any way to get the list of methods (method name, return value, parameters). Could you help me out on this one?
Thomas Hartmann last edited by
Unfortunately, NodeMetaInfo does not support enumerating methods. The code model does support this, though.
You could add the functionality to NodeMetaInfo by extending the MemberProcessor and implementing processSlot() similar to how processSignal() is implemented.
How to handle function parameters you can lookup in qmljseditor.cpp for the implementation of CodeModelInspector.