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
Developer
tonygluk
Posts: 30
Registered: ‎11-06-2012
My Carrier: MegaFon
Accepted Solution

Viewing logs without QNX Momentics IDE

Hi everybody!

 

I've switched to QT Creator for faster compilation & deployment.

Everything works fine including debugging but it doesn't display logs (qDebug etc).

 

I know that logs should be redirected to stdout/stderr if they are to be displayed in QNX Momentics console.

This is done using qInstallMsgHandler and it works. But it doesn't work in QT Creator.

 

So the question is:

How does QNX Momentics intercept the logs after they are redirected to stderr/stdout?

 

I was able to view the logs via SSH using the following method. It works for slogger2, but I don't know how to access stdout/stderr output:

 

1) Start blackberry-connect

 

/Applications/bbndk/host_10_0_9_52/darwin/x86/usr/bin/blackberry-connect 192.168.157.128 -password devicePass -sshPublicKey     "/Users/User/.config/QtProject/qtcreator/qnx/BlackBerry Simulator/id_rsa.pub"

 

2) ssh devuser@192.168.157.128 -i "/Users/User/.config/QtProject/qtcreator/qnx/BlackBerry Simulator/id_rsa"

 

3) slog2info -w | grep qt-msg

 

Any suggestions are welcome!

 

 

 

Please use plain text.
Developer
djogon
Posts: 93
Registered: ‎10-29-2012
My Carrier: Various

Re: Viewing logs without QNX Momentics IDE

I would rather use QtCreator as well. The Eclipse IDE was never something I liked. 

 

Which version of Qt Creator did you use? Any special setup steps? 

 

Btw. I have seen that it was recommended to use simple sprintf... instead of qDebug() to log your stuff since it wasn't working. So I think what you've seen is just a macro that will use standard console output functions.

 

 

Please use plain text.
Developer
noahhuang
Posts: 100
Registered: ‎10-01-2012
My Carrier: Roger

Re: Viewing logs without QNX Momentics IDE

Does QtCreator support Cascades development?

 

Can it support Qt5?

 

I really want to move from eclipse to some tools most developers can trust...

Please use plain text.
Developer
djogon
Posts: 93
Registered: ‎10-29-2012
My Carrier: Various

Re: Viewing logs without QNX Momentics IDE

I doubt thay you can use Qt5 with it, but I would be happy with Qt4 just as long as I could use QtCreator properly.

Please use plain text.
Developer
tonygluk
Posts: 30
Registered: ‎11-06-2012
My Carrier: MegaFon

Re: Viewing logs without QNX Momentics IDE

[ Edited ]

It does support Cascades.

I've followed this guide:

 

http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10

 

Autocompletion did not work initially. I don't know why, maybe paths were too long?

As a workaround I've created a symlink in my project folder:

 

include -> /Applications/bbndk/target_10_0_9_386/qnx6/usr/include

 

Then added the following lines to .pro file:

 

INCLUDEPATH += include include/qt4/QtCore
LIBS += -lbbcascades

By the way, logs started working after reboot. :smileyhappy:

Everything is working now.

 

p.s. I'm using Mac OS X Lion.

Please use plain text.