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
New Contributor
joshua_wong
Posts: 8
Registered: ‎10-27-2011
My Device: Q10

Re: Installing QT in the QNX IDE


Kevin_L wrote:

Does anyone have build this QT on Windows ?



This is what I did to use QT through the IDE in Windows.

 

1) follow the instructions by HEC Geek to compile the QT library in an Ubuntu virtual machine

 

2) copy the entire "stage" directory to your NDK installed in Windows.  For example, mine is under C:/bbndk-1.0/target/target-override/armle-v7/usr/lib/qt (include files were copied to C:/bbndk-1.0/target-override/usr/include/qt)

 

3) create a "BlackBerry Tablet OS C/C++ Project"

 

4) in the bar-descriptor.xml file Assets tab, add all the QT shared libraries that you are using and the platform plugin

 

5) for the platform plugins libblackberry, modify the target path to lib/platforms/libblackberry.so (you will have to edit the xml source manually, if you don't do this the runtime will complain about not being able to load the platform plugin)

 

6) Under the linker settings, link only the QT libraries and bbsupport but NOT the platform plugins

 

7) Build your project and run

 

I only tried this on a device but not the simulator.  Hope this helps.

Please use plain text.
Contributor
Kevin_L
Posts: 16
Registered: ‎10-21-2011
My Device: 8520

Re: Installing QT in the QNX IDE

Thanks !

 

I tried your solution but tools like qmake, rcc, etc are built for Linux.

 

I still trying to found a solution but I think that the source code of configure.exe should be updated.

Please use plain text.
Contributor
Kevin_L
Posts: 16
Registered: ‎10-21-2011
My Device: 8520

Re: Installing QT in the QNX IDE

Ok, I've updated the source code of configure.exe and I am now able to build QT on Windows with MinGW32.

 

I've built the sample given on http://hecgeek.blogspot.com/2011/10/qt-for-blackberry-playbook.html and deployed it on the simulator 1.0.7. When I launch this HelloWorld sample on the simulator I see nothing.

 

So, I've built QT and the sample on an Ubuntu in order to compare the result and it is the same.

 

Does anyone have try this sample with the simulator ?

Please use plain text.
New Contributor
joshua_wong
Posts: 8
Registered: ‎10-27-2011
My Device: Q10

Re: Installing QT in the QNX IDE

I haven't try this on the simulator but I've tried it on the actual hardware and it worked.

 

Did you see any error message in the console window in the IDE when you try to run the app?

Please use plain text.
Contributor
Kevin_L
Posts: 16
Registered: ‎10-21-2011
My Device: 8520

Re: Installing QT in the QNX IDE

The sample is installed with the command line for the moment.

 

I'm trying to build and deploy the sample with the IDE but deploiement doesn't work at this time. I'm working on it.

 

Thanks

Please use plain text.
Contributor
Kevin_L
Posts: 16
Registered: ‎10-21-2011
My Device: 8520

Re: Installing QT in the QNX IDE

I've got the log file from the simulator.

 

libEGL info: use DRM for display 40000001
libEGL debug: searching for pipe module vmwgfx_drv
libEGL debug: expanded path /usr/lib/graphics/vmware/libpipe_vmwgfx_drv.so
libEGL debug: loaded /usr/lib/graphics/vmware/libpipe_vmwgfx_drv.so
libEGL debug: the best driver is Gallium (score 100)
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::deviceTransform: Painter not active
QPainter::worldTransform: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::deviceTransform: Painter not active
QPainter::worldTransform: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setPen: Painter not active
QPainter::save: Painter not active
QPainter::setBackgroundMode: Painter not active
QPainter::background: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrushOrigin: Painter not active
QPainter::setPen: Painter not active
QPainter::drawRects: Painter not active
QPainter::drawRects: Painter not active
QPainter::drawRects: Painter not active
QPainter::drawRects: Painter not active
QPainter::restore: Unbalanced save/restore
QBB: failed to post window buffer, errno=22
MESA EGL

 

Please use plain text.
Contributor
drfrancky
Posts: 31
Registered: ‎10-22-2011
My Device: Playbook

Re: Installing QT in the QNX IDE

4) in the bar-descriptor.xml file Assets tab, add all the QT shared libraries that you are using and the platform plugin

 

5) for the platform plugins libblackberry, modify the target path to lib/platforms/libblackberry.so (you will have to edit the xml source manually, if you don't do this the runtime will complain about not being able to load the platform plugin)

 

6) Under the linker settings, link only the QT libraries and bbsupport but NOT the platform plugins

 

Can you explain those steps in some more details ? Like step by step ?

 

_______________________________________________________
Check my apps for Playbook at AppWorld:
Flash Video Player
Playbook Gallery for Facebook
Playbook Stream Player
Please use plain text.
Contributor
boris812
Posts: 22
Registered: ‎02-02-2012
My Device: none

Re: Installing QT in the QNX IDE

Ok, i've done everything HEC Geek did, but I have the following issue:

gmake[1]: qcc: Command not found

 What am I missing?

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

Re: Installing QT in the QNX IDE

You are missing

source /opt/RIM/bbndk/bbndk-env.sh

 

Please use plain text.
Contributor
boris812
Posts: 22
Registered: ‎02-02-2012
My Device: none

Re: Installing QT in the QNX IDE

Thanks!

It was stupid problem.

Please use plain text.