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

New Contributor
Posts: 3
Registered: ‎01-18-2013
My Device: Dev Alpha
Accepted Solution

Problem running QtGui / GraphicsView app on Dev Alpha

Hi guys,

I'm trying to port a Harmattan app over to BB10 with little success. I've obviously modified it so that "haptics" uses VibrationController and QMediaPlayer replaced by MediaPlayer. QAccelerometer I've use as-is from QtMobility. Other than that, I generated a new Cascades project in the NDK, copied the source files into the source folder (qml to assets) and followed these instructions: http://www.maemopeople.org/index.php/jaffa/2012/06/20/initial_success_in_porting_harmattan_sym


My program compiles but never reaches int main(...). Here's the beginning of main.cpp:

#include <QtGui/QApplication>
#include <QtDeclarative>
#include <QDebug>
#include "mygraphicsscene.h"
Q_DECL_EXPORT int main(int argc, char **argv)
	fprintf(stdout, "reached this\n");
	qDebug() << "testing debug\n";

 None of the above messages show up when running the app on the Dev Alpha.


Here are the .pro (my game uses opengl in graphicsview), Makefile and bardescriptor, if theyre of any help:

APP_NAME = testapp

CONFIG += qt warn_on cascades10 mobility
QT += core declarative opengl
MOBILITY += sensors
LIBS += -lbbsystem -lbbmultimedia -lbbdevice 
INCLUDEPATH += ../src ${QNX_TARGET}/usr/include/qt4/QtCore
DEPENDPATH += ../src ${QNX_TARGET}/usr/include/qt4/QtCore



QMAKE_TARGET  = testapp
PROJECT_DIR	  := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
I18N_DIR	  := $(PROJECT_DIR)/translations

include mk/cs-base.mk


<?xml version="1.0" encoding="utf-8" standalone="no"?>
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
    <description>The testapp application</description>
    <configuration name="Device-Debug">
       <asset path="arm/o.le-v7-g/testapp" entry="true" type="Qnx/Elf">testapp</asset>
    <configuration name="Device-Release">
       <asset path="arm/o.le-v7/testapp.so" entry="true" type="Qnx/Elf">testapp.so</asset>
    <configuration name="Device-Profile">
       <asset path="arm-p/o.le-v7-g/testapp" entry="true" type="Qnx/Elf">testapp</asset>
    <configuration name="Simulator-Debug">
       <asset path="x86/o-g/testapp" entry="true" type="Qnx/Elf">testapp</asset>
    <asset path="icon.png">icon.png</asset>
    <asset path="assets">assets</asset>
    <asset path="translations" dest="qm">
        <include name="*.qm"/>
    <permission system="true">run_native</permission>
    <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
	<env var="QT_QPA_FONTDIR" value="/usr/lib/qt4/lib/fonts" /> 


I know it's difficult to troubleshoot something like this but maybe someone else has faced problems with graphicsview?

New Contributor
Posts: 3
Registered: ‎01-18-2013
My Device: Dev Alpha

Re: Problem running QtGui / GraphicsView app on Dev Alpha

[ Edited ]

Well, got it running and really have no idea what I did. Let's see if I can fix the remaining bugs.


Edit: Once I got the correct libraries loaded, I believe it was errors in qml that crashed the app.

New Contributor
Posts: 3
Registered: ‎01-18-2013
My Device: Dev Alpha

Re: Problem running QtGui / GraphicsView app on Dev Alpha

Well, works now and submitted to App World. Source available at https://github.com/mjafin/TrapSKEM