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
Contributor
tzander
Posts: 40
Registered: ‎05-14-2013
My Device: Z10
My Carrier: none

Qt5 deployment to z10

Hi,

 

I'm working on an app that would run a lot smoother using Qt5, and as such I started using it.

It looks great, on my desktop :smileywink:

 

To run it on my z10, I cross-compiled Qt5.1 per the instructions on http://qt-project.org/wiki/Building-Qt5-for-Blackberry

This works fine, and I get an executable.

 

So, the next step is to deploy it to my device!

This implies that I upload the cross-compiled Qt5 as part of my bar package and make the app run against that.

I found a nice tutorial here; https://github.com/preet/scratch/wiki/Qt-5.1-Alpha-on-the-Playbook

 

Following this I however didn't succeed.

At fist I got some errors in the logs/log file saying a .so was missing, so I'm on the right path. Those errors went away and instead I just get an empty 'log' file and a core file.
I'm not sure where to go from here; gdb says;

Hi,

 

I'm working on an app that would run a lot smoother using Qt5, and as such I started using it.

It looks great, on my desktop :smileywink:

 

To run it on my z10, I cross-compiled Qt5.1 per the instructions on http://qt-project.org/wiki/Building-Qt5-for-Blackberry

This works fine, and I get an executable.

 

So, the next step is to deploy it to my device!

This implies that I upload the cross-compiled Qt5 as part of my bar package and make the app run against that.

I found a nice tutorial here; https://github.com/preet/scratch/wiki/Qt-5.1-Alpha-on-the-Playbook

 

Following this I however didn't succeed.

At fist I got some errors in the logs/log file saying a .so was missing, so I'm on the right path. Those errors went away and instead I just get an empty 'log' file and a core file.
I'm not sure where to go from here; gdb says;

Hi,

 

I'm working on an app that would run a lot smoother using Qt5, and as such I started using it.

It looks great, on my desktop :smileywink:

 

To run it on my z10, I cross-compiled Qt5.1 per the instructions on http://qt-project.org/wiki/Building-Qt5-for-Blackberry

This works fine, and I get an executable.

 

So, the next step is to deploy it to my device!

This implies that I upload the cross-compiled Qt5 as part of my bar package and make the app run against that.

I found a nice tutorial here; https://github.com/preet/scratch/wiki/Qt-5.1-Alpha-on-the-Playbook

 

Following this I however didn't succeed.

At fist I got some errors in the logs/log file saying a .so was missing, so I'm on the right path. Those errors went away and instead I just get an empty 'log' file and a core file.
I'm not sure where to go from here; gdb says;

  Program terminated with signal 6, Aborted.
  #0  0x0000001a in ?? ()

Anyone got any ideas, hints?

 

I'm using the gold SDK for cross-compile and the stock Z10 10.0 Os.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Qt5 deployment to z10

When you debug your app do you get to main() or the app just fails to start at all?

Please use plain text.
Contributor
tzander
Posts: 40
Registered: ‎05-14-2013
My Device: Z10
My Carrier: none

Re: Qt5 deployment to z10

[ Edited ]

Hi,

 

I managed to convince eclipse to create a native app, and I added the Qt5Core and the Qt5Gui libraries to it. I added this main.cpp;

 

#include <QGuiApplication>
int main(int argc, char **argv)
{
    QGuiApplication app(argc, argv);
    app.setOrganizationName("Ecma");
    app.setOrganizationDomain("example.com");
    app.setApplicationName("myQt5TestApp");

    return app.exec();
}

 

Then ran it in the debugger.

It aborts (segabort) on entering (stepping into) QGuiApplication.

I then changed that to QCoreApplication, which works fine. But naturally that one is kind of useless :smileywink:

 

During this it turns out there is a binary incompatibility in the Gold SDK and the device (I now run 10.1.0.273). So I copied from library from the device to my sdk (and recompiled Qt).

 

Has anyone managed to get this to run at all?  If so, any hints on how they did would be greatly appreciated!

Please use plain text.
Developer
Zingam
Posts: 187
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: Qt5 deployment to z10

Yeah, they've promised BlackBerry 10 to become 1st Tier this year. Android is almost there and even iOS will follow but no word about BB10.

How long did it take for you to compile Qt 5? Have you tried to use Qt Creator? I also have big Qt 5 plans on BB10 but everything about the platform is so foggy.

Please use plain text.
New Contributor
iktwo
Posts: 2
Registered: ‎06-12-2013
My Device: Z10 LE
My Carrier: T-Mobile

Re: Qt5 deployment to z10

Hi tzander last week I was also trying to get Qt5 on my Z10 and at first I cloned the Qt5 gitorious repository and I couldn't get it working, I think I was using Qt 5.1, I tried with Qt 5.02 and that one worked flawlessly, for the bar file I have this lines:

 

    <asset path="%QT_INSTALL_LIBS%">lib</asset>
    <asset path="%QT_INSTALL_PLUGINS%">plugins</asset>
    <asset path="%QT_INSTALL_QML%">imports</asset>
    <asset path="%SRC_DIR%/qml">qml</asset>

 

Those were auto generated using latest Qt Creator, the problem with those lines is that your binary will be huge, there's a way to specify only what you need but I don't have my code with me right now, later I will edit this with that information, hope that helps!

 

Please use plain text.
Contributor
tzander
Posts: 40
Registered: ‎05-14-2013
My Device: Z10
My Carrier: none

Re: Qt5 deployment to z10

Oh, thanks!

I've started a recompile, will try a deployment tonight... :smileyhappy:

Please use plain text.
New Contributor
iktwo
Posts: 2
Registered: ‎06-12-2013
My Device: Z10 LE
My Carrier: T-Mobile

Re: Qt5 deployment to z10

You can try to add in your bar-descriptor something like this:

 

    <asset path="%QT_INSTALL_LIBS%/libQt5Core.so.5">lib/libQt5Core.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Gui.so.5">lib/libQt5Gui.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Network.so.5">lib/libQt5Network.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Multimedia.so.5">lib/libQt5Multimedia.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Qml.so.5">lib/libQt5Qml.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Quick.so.5">lib/libQt5Quick.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Sql.so.5">lib/libQt5Sql.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5V8.so.5">lib/libQt5V8.so.5</asset>
    <asset path="%QT_INSTALL_LIBS%/libQt5Xml.so.5">lib/libQt5Xml.so.5</asset>

 

You can remove the ones that you don't need..

I highly recommend you to get latest Qt Creator :smileyhappy:

Please use plain text.
Regular Contributor
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM

Re: Qt5 deployment to z10

About 4 months ago, I followed instructions on how to compile Qt5 for BB10 from git and package application. Everything worked fine for me. I managed to shrink my app size by deploying only libraries that I need. It was fine, much easier than for android for example. I even ported and published my game successfully (http://appworld.blackberry.com/webstore/content/20079022)

 

2 days ago I wanted to repeat the process and update my game with the latest and greatest Qt 5.1 from git. It doesn't work anymore. App just crashes on start. I'm dissapointed, but I hope BB Qt team will fix that.

Please use plain text.
Developer
Zingam
Posts: 187
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: Qt5 deployment to z10

I have a question about Qt Creator: Are you able to successfuly use the debugger in Qt creator to debug any Qt applications? Everytime I try to debug an application even the default created by the wizzard, the debugger crashes and locks up the simulator.

 

Has anybody compiled Qt for BlackBerry successfuly on Windows?

Please use plain text.
Developer
Zingam
Posts: 187
Registered: ‎05-09-2012
My Device: Playbook, Z10 LE

Re: Qt5 deployment to z10

Maybe you should complain about that - loudly and proudly. I've compained that there is no BlackBerry Kit icon in Qt Creator 2.7 and it seems they have put one in 2.8. :smileyhappy:

Please use plain text.