Guidelines and HOWTOs/Debugging/QML

From KDE Community Wiki
Revision as of 02:40, 19 January 2023 by Nmariusp (talk | contribs) (Start page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Qt Creator QML debugger

Qt Creator contains a debugger for QML and javascript for QML. See https://doc.qt.io/qtcreator/creator-debugging-qml.html

A screen recording version is available https://www.youtube.com/watch?v=aaqc_4K-cCQ

KDAB gammaray

If your QML application is built using the same Qt version as the application gammaray. E.g. install both Qt and gammaray from your Linux OS' packages.

Then open your QML app, open gammaray and tell gammaray to connect to your QML app. In gammaray, the top level tab "Quick Scenes" is for inspecting QML and Qt Quick. The top level tab "Models" is for the model objects that are provided to QML objects. "Problems" is for QML warnings such as binding loops or QML objects that are outside of the view.

In "Quick Scenes" in the top of the window the is a combobox that allows you to select the QML window that you want to inspect. E.g. if an application has both a main window and a settings window.

You can right click on a QML object and select "Show in "Quick Scenes" tool", "Show in "Objects" tool", "Show in "Meta Objects" tool", "Show in "Signals" tool".