[Interest] QML Inspector?

Rutledge Shawn Shawn.Rutledge at theqtcompany.com
Fri Jun 26 12:33:38 CEST 2015


On 25 Jun 2015, at 21:41, Jérôme Godbout <jerome at bodycad.com> wrote:

> There's GammaRay
> http://www.kdab.com/kdab-products/gammaray/
> https://github.com/KDAB/GammaRay
> 
> It's not 100% efficient, but better then nothing. We end up doing our own debugger command line to search and inspect object along a TreeView from QWidgets to see/edit properties, pointer value, invoke methods and emit signal. I would love to see one build for Qml build-in, we could stop maintain ours.

https://codereview.qt-project.org/#/c/44322/ is a patch for qmlscene which I’ve been occasionally developing and using for a long time (2012 or so).  Earlier versions looked at the object hierarchy (the QObject parent/child relationship), whereas now it looks at the top-level Item’s childItems().  Each way has its advantages… There is a QAIM model and a QTreeView to view the items and a few properties, and a “dump” button to get the rest.

However it’s not desirable to have a dependency on widgets in a QML tool.  (Although maybe having it in qmlscene wouldn’t be so bad, because we are trying to deprecate qmlscene anyway.)  And it crashes sometimes, because the tree does not automatically remove objects when they are destroyed, so it can end up trying to get properties from dead objects.  I’m sure that’s fixable if the desire continues to have such a tool.  Maybe it could even be dynamically loaded by the qml tool, instead of being linked in.  And I’d want it to be able to discover all of an application’s windows.  And I’d like to have it show the scene graph nodes which each Item is responsible for, and the z stacking order.

Ideally maybe we should have a TreeView which can directly use any object hierarchy as the model, without needing a QAIM.  But of course such a tree would have to avoid inspecting itself.

Maybe it’s not worth doing, now that GammaRay is working well enough?  What do you not like about GammaRay at this point?




More information about the Interest mailing list