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
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)
Accepted Solution

fail to run qtquick 2 application in bb10 device

I download Qt 5.0.1 from Git and build it for BB10 as instruction: http://qt-project.org/wiki/Building-Qt5-for-Blackberry. I also download Qt Creator 2.6.1 for Mac. But when I deploy the packge to device and run, the error prompts:

main.qml:1:1: module "QtQuick" is not installed 
     import QtQuick 2.0 

I use the basic Blackberry Qt Quick 2 application template to create the helloworld.

.pro file

TEMPLATE = app

QT += qml quick

# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =

# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp

OTHER_FILES += bar-descriptor.xml \
               qml/main.qml

 bar-description.xml

<?xml version='1.0' encoding='utf-8' standalone='no'?>
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
    <id>com.example.qtquick2</id>
    <name>qtquick2</name>
    <versionNumber>1.0.0</versionNumber>
    <description>DESCRIPTION</description>
    <initialWindow>
        <systemChrome>none</systemChrome>
        <transparent>false</transparent>
        <autoOrients>true</autoOrients>
        <aspectRatio>landscape</aspectRatio>
    </initialWindow>
    <publisher>PUBLISHER</publisher>
    <copyright>COPYRIGHT</copyright>
    <env value="app/native/imports" var="QML_IMPORT_PATH"/>
    <env value="app/native/plugins" var="QT_PLUGIN_PATH"/>
    <env value="app/native/lib" var="LD_LIBRARY_PATH"/>
    <arg>-platform</arg>
    <arg>qnx</arg>
    <action system="true">run_native</action>
    <asset path="qtquick2" type="Qnx/Elf" entry="true">qtquick2</asset>
    <asset path="%SRC_DIR%/qml">qml</asset>
    <!-- These values will be replaced when deploying in Qt Creator -->
    <asset path="%QT_INSTALL_LIBS%">lib</asset>
    <asset path="%QT_INSTALL_PLUGINS%">plugins</asset>
    <asset path="%QT_INSTALL_IMPORTS%">imports</asset>
</qnx>

 Any suggestion is appreciated. Thanks.

 

Regular Contributor
Guillaume_LACHAUD
Posts: 60
Registered: ‎12-19-2012
My Device: BB10 Alpha B

Re: fail to run qtquick 2 application in bb10 device

QtQuick 2.0 is not supported at the moment, only QtQuick 1.1 is.

 

See http://qt-project.org/wiki/QNX for more information

Developer
connyhald
Posts: 102
Registered: ‎06-03-2012
My Device: Playbook

Re: fail to run qtquick 2 application in bb10 device

QtQuick 2.0 might not be *officially* supported, but it works (mostly).

 

A couple of notes

  • Use QML2_IMPORT_PATH instead of QML_IMPORT_PATH in Qt 5.0
  • Make sure you have the QtQuick 2.0 plugin (QtQuick.2) available via QML_IMPORT_PATH. After compilation you find them under <sourceRoot>/qml/

 

-----------
http://kodira.de
BB Apps: Pattern :: Plonk
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)

Re: fail to run qtquick 2 application in bb10 device

sigh,

I see there is templates for Blackberry Qt5 in Qt Creator. Thus I expect it should be supported in BB10.

Developer
connyhald
Posts: 102
Registered: ‎06-03-2012
My Device: Playbook

Re: fail to run qtquick 2 application in bb10 device

Hmm, never tried those templates so can't say anything about it. Probably it's still work in progress.

-----------
http://kodira.de
BB Apps: Pattern :: Plonk
Regular Contributor
Guillaume_LACHAUD
Posts: 60
Registered: ‎12-19-2012
My Device: BB10 Alpha B

Re: fail to run qtquick 2 application in bb10 device

Here is the description of the template in QtCreator :

 

Creates an experimental Qt Quick 2 application for BlackBerry 10. You need an own Qt5 build for BlackBerry 10 since Qt5 is not provided in the current BlackBerry 10 NDK and is not included in DevAlpha devices.

Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)

Re: fail to run qtquick 2 application in bb10 device


connyhald wrote:

Hmm, never tried those templates so can't say anything about it. Probably it's still work in progress.


But your suggestion works. Thanks.

New Contributor
Strahlex
Posts: 4
Registered: ‎01-22-2013
My Device: None

Re: fail to run qtquick 2 application in bb10 device

So we need to build Qt5 from the source to make QtQuick 2 work?