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
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.
Accepted Solution

Qt Creator 3.0 as alternative to Momentics

 

Hi,

 

is anybody using Qt Creator to create Cascades app? It's possible since the release of 3.0. I tried it shortly after release and realized that it works. However it doesn't have e. g. autocomplete for Cascades classes in QML code. It's also unable to highlight typing errors. I think it shouldn't be so difficult to make those work.

 

Apart from that, I find Qt Creator much more convenient than Momentics IDE. For example, all shortcuts work as expected (F3 for finding a string, Ctrl-Tab for switching between editors...)


SQL Terminal – command-line interface to local SQLite database
Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Qt Creator 3.0 as alternative to Momentics

Hi,

 

It's been possible for more than a year. :smileyhappy: I'm using it for my apps, although not using QML in them.  It's a great IDE, signals & slots autocompletion saves a lot of time. For QML autocompletion there's a workaround:

http://qt-project.org/forums/viewthread/26372

C++ autocompletion should work out of the box.

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: Qt Creator 3.0 as alternative to Momentics

 

Thank you. I have followed this page and imported my Cascades project into Qt Creator, although I'm not yet able to build it. One problem seem to be header file subdirectories. While it was possible to write 

#include "OnlineStatusReporter.h"

 in Momentics IDE even though the header file is in a subdirectory, in Qt Creator it seems to be necessary to add subdirectory like this:

#include "OnlineStatus/OnlineStatusReporter.h"

 Do you think the subdirectories can be added somewhere as "include paths"? (I know I can specify include paths as compiler switch, but I suppose that it doesn't work for local header files, only for library header files included with angle brackets).

 

Another concern for me is exporting a release build (for BB World etc.). Is that possible in Qt Creator?


SQL Terminal – command-line interface to local SQLite database
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: Qt Creator 3.0 as alternative to Momentics

 

I resolved the above error and a couple of others, so now I'm able to run the project on a Z10. However, the application crashes as soon as it starts to use GPS!

And I get a lot of warnings in console: "QIODevice::write: ReadOnly device". Seems like SQLite-related problem.

 

I'm trying to resolve that, I'm just posting for the case that some of the authors of Cascades importer are reading this.


SQL Terminal – command-line interface to local SQLite database
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: Qt Creator 3.0 as alternative to Momentics

 

So the application crashes when it attempts to execute this line:

m_compass->connectToBackend();

 where m_compass is a pointer to QCompass.

The error produced:

Process 543695093 (creatordraft-blackberry) terminated SIGSEGV code=1 fltno=11 ip=78e4594a(/base/usr/lib/qt4/lib/libQtSensors.so.1.2.2@_ZNK10QtMobility21QOrientableSensorBase19axesOrientationModeEv+0xd) mapaddr=0001594a. ref=fffff326

 When I imported the project, the following line in the *.pro file was changed from:

CONFIG += qt warn_on cascades10 mobility

to:

CONFIG += warn_on mobility qt

and the following line was added:

LIBS += -lbb -lbbcascades

 

Anybody has a clue why it started to crash after migrating to Qt Creator?


SQL Terminal – command-line interface to local SQLite database
Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Qt Creator 3.0 as alternative to Momentics

Make sure you aren't writing to assets/ folder which is readonly if the app is deployed to a device.

In case database is stored there, it should be copied to data/ folder first.

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: Qt Creator 3.0 as alternative to Momentics

 

Nobody was responding to my major problem with QCompass, so I have to respond myself:

 

In this case it was helpful to compare Makefile generated by Qt Creator to Makefile generated by Momentics. I was copying lines from the latter to the former and rebuilding the project. This way I was able to narrow the differences down to a single one that was causing the problem:

-DQ_OS_BLACKBERRY on the line starting with DEFINES

 

I have added the definition to *.pro file and now everything works fine.


SQL Terminal – command-line interface to local SQLite database