Guidelines and HOWTOs/Debugging/QML: Difference between revisions

From KDE Community Wiki
(Start page)
 
(Add chapter Misc)
Line 14: Line 14:


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".
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".
== Misc ==
There are javascript logging functions. You can debug module imports. There are the tools qml, qmlscene, qmllint, qmlprofiler. See https://doc.qt.io/qt-6/qtquick-debugging.html

Revision as of 02:43, 19 January 2023

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".

Misc

There are javascript logging functions. You can debug module imports. There are the tools qml, qmlscene, qmllint, qmlprofiler. See https://doc.qt.io/qt-6/qtquick-debugging.html