O'Reilly logo

Qt 5 Blueprints by Symeon Huang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging QML

The most common practice to debug QML is the use of the API console. JavaScript developers should be familiar with this because of the console support in QML. The relationships between the console functions and the Qt/C++ QDebug functions are given as follows:

QML

Qt/C++

console.log()

qDebug()

console.debug()

qDebug()

console.info()

qDebug()

console.warn()

qWarning()

console.error()

qCritical()

With the preceding supports present, QML is just like JavaScript programming. At the same time, the following functions are also introduced in QML:

Functions

Description

console.assert()

This function tests whether the expression is true. If not, it will write an optional message to the console and print ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required