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
mjafin
Posts: 3
Registered: ‎01-18-2013
My Device: Dev Alpha
My Carrier: Virgin Mobile UK
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");
	fflush(stdout);
	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

include(config.pri)

 

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">
    <id>com.example.testapp</id>
    <name>testapp</name>
    <versionNumber>1.0.0</versionNumber>
    <buildId>1</buildId>
    <description>The testapp application</description>
    <author>mja</author>
    <authorId>gYAAgAQEBXEMkIBptFYS5lLFGpY</authorId>
    <initialWindow>
        <systemChrome>none</systemChrome>
        <transparent>false</transparent>
    </initialWindow>
    <category>core.games</category>
    <configuration name="Device-Debug">
       <platformArchitecture>armle-v7</platformArchitecture>
       <asset path="arm/o.le-v7-g/testapp" entry="true" type="Qnx/Elf">testapp</asset>
    </configuration>
    <configuration name="Device-Release">
       <entryPointType>Qnx/Cascades</entryPointType>
       <platformArchitecture>armle-v7</platformArchitecture>
       <asset path="arm/o.le-v7/testapp.so" entry="true" type="Qnx/Elf">testapp.so</asset>
    </configuration>
    <configuration name="Device-Profile">
       <platformArchitecture>armle-v7</platformArchitecture>
       <asset path="arm-p/o.le-v7-g/testapp" entry="true" type="Qnx/Elf">testapp</asset>
    </configuration>
    <configuration name="Simulator-Debug">
       <platformArchitecture>x86</platformArchitecture>
       <asset path="x86/o-g/testapp" entry="true" type="Qnx/Elf">testapp</asset>
    </configuration>
    <icon>
        <image>icon.png</image>
    </icon>
    <asset path="icon.png">icon.png</asset>
    <asset path="assets">assets</asset>
    <asset path="translations" dest="qm">
        <include name="*.qm"/>
    </asset>
    <permission system="true">run_native</permission>
    <permission>read_device_identifying_information</permission>
    <permission>access_shared</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" /> 
</qnx>

 

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



Please use plain text.
New Contributor
mjafin
Posts: 3
Registered: ‎01-18-2013
My Device: Dev Alpha
My Carrier: Virgin Mobile UK

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.

Please use plain text.
New Contributor
mjafin
Posts: 3
Registered: ‎01-18-2013
My Device: Dev Alpha
My Carrier: Virgin Mobile UK

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

Please use plain text.