PDA

View Full Version : qml errors in C++ program



jstarr
12th October 2018, 22:43
I am using qml code accessed from a C++ program written in Visual Studio 2010. Sometimes there are qml errors that occur at runtime, for example, a reference to an undefined property in the qml. An error message is written to the console window when this happens, but it is easy to overlook. Is there some way to trap these errors when they occur, such as a signal that is emitted when a run-time error occurs?

Lesiok
13th October 2018, 10:07
Read about qInstallMessageHandler (http://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler).