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
Rondog
Posts: 10
Registered: ‎01-15-2013
My Device: Playbook

Qt on Playbook

I tried porting a Qt application (4.8.3) to the playbook and was surprised at how much of it worked. I did run into a number of user interface problems such as the following: - Switch between portrait and landscape causes resize problems (yes, I am using showMaximized(); ). - Dialog boxes frequently stay visible after closing. Rotating the screen hides anything that shouldn't be there. - close() signal not created for main window. - QListWidgets occasionally range selects as thought the 'shift' key was pressed after selecting an initial item. - Various other idiosyncrasies related to the user interface. I was able to work around most of the problems with various 'kludges' but I am not happy with it. The end result works but with obvious problems. Has anyone done any serious work with Qt on the Playbook and found a solution to these kinds of UI problems?
Contributor
Rondog
Posts: 10
Registered: ‎01-15-2013
My Device: Playbook

Re: Qt on Playbook

I have noticed some changes in the newer versions of Qt (4.8.4 and 5.0.0) which suggests that the situation will improve in the future.  Maybe cascades will become available for the playbook sometime soon.

 

The problems I have experienced seem to be from the lack of a window manager.  For example I found I need to manually set the active widget when a dialog is closed or it will stay visible most of the time (QWidget::activeWindow).  Window resizing (portrait to landscape) is still ugly.

 

It seems that Qt on a Playbook has too many quirks to develop anything 'professional'.

 

 

Developer
lewellyn
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A

Re: Qt on Playbook

[ Edited ]

You might be interested in http://wiki.qt-project.org/QNX as well as the #qt-qnx channel on the Freenode IRC network. There are, indeed, people working on making things better (and working around what's not yet). :smileyhappy:

 

(Stop by #BlackBerryDev on freenode, as well, since it's a more active and generally-scoped channel [though since Cascades is the new shiny thing, that's what much of the conversation tends toward at the moment].)



Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! :smileyvery-happy:
Developer
xsacha
Posts: 90
Registered: ‎10-30-2011
My Device: Blackberry Playbook

Re: Qt on Playbook

[ Edited ]

You will find the newer versions of Qt are much better than 4.8.3.

Especially the one that is included in Blackberry 10 firmware.

 

For now, I recommend just compiling Qt 5.0 for Playbook ( http://qt-project.org/wiki/Building-Qt5-for-Blackberry ) because that's the branch where all the Blackberry work is being done in right now.

BlackBerry Development Advisor
fbumberger
Posts: 5
Registered: ‎10-04-2012
My Device: Playbook

Re: Qt on Playbook

Please don't use showMaximized(). Use showFullScreen() instead. This could solve the rotation problem.

Contributor
Rondog
Posts: 10
Registered: ‎01-15-2013
My Device: Playbook

Re: Qt on Playbook

QWidget::showFullScreen() works great!. You are absolutely right and this fixed a bunch of problems. It is funny I didn't notice this command especially since it is right next to showMaximized() in the help.
Contributor
Rondog
Posts: 10
Registered: ‎01-15-2013
My Device: Playbook

Re: Qt on Playbook

I have tried different versions of Qt (4.8.3, 4.8.4, and 5.0.0).  I have actually compiled and installed programs using all three versions of Qt on my playbook (which I got for Christmas by the way).  I was actually blown away by the entire process as I didn't expect any kind of success.

I have been using 4.8.3 lately because it has the least issues.  The problems with the other two versions were real show stoppers:

Qt 4.8.4

I wasn't able to compile this version of Qt without modification of the source code as the functions navigator_set_orientation_mode() from <bps/navigator.h> don't exist in the playbook sdk.  The modifications involved using functions from <bps/orientation.h> instead.

The end result was a fiery crash when the screen rotated which I couldn't find a way to prevent.


Qt 5.0.0

This worked the best for small test applications but when I tried something more substantial the application would SEGFAULT in libQt5Core.so (before it reached main()).  I don't have a lot of experience debugging applications at this point in the initialization so I only got as far as finding where the problem occurs.  This wasn't specific to qnx as it also happened on my desktop computers as well.