Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Trusted Contributor
Posts: 134
Registered: ‎05-31-2010
My Device: 8300
My Carrier: vodqafone
Accepted Solution

cout in QML?

Hi,

 

   As I mentioned in subject, is there any way to print logs in QML like std::cout in Cpp.

 

 

Regards,

sha.

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: cout in QML?

[ Edited ]

Hi,

 

Qt has qDebug() macro which can also be used. The added benefit is that it can be easily disabled by adding a macro to .pro file: qDebug() << "Text\n";

 

console.log('Text') is QML alternative.

 

Check "Known limitations" in Release notes for additional steps on setting up the logs:

http://developer.blackberry.com/cascades/downloads/releasenotes/

 


Andrey Fidrya, @zmeyc on twitter