Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    QML dependencies

    Reply
    alynsparkes | # 1 | 2011-02-25, 16:44 | Report

    Hi,
    I've written a simple application in QML. All the main.cpp file does is start the qmlviewer and point it at the main qml file.

    If I run this on my N900 with the QT Quick compatibility plugin 1.0 installed, it's fine. If I uninstall that plugin, the app starts, but it looks like the qmlviewer never gets loaded.

    In the .pro file there are some commented out lines about "If you're using QT mobility..." but it's not clear to me what I should enter as the variable(s).

    I've tried just entering the compatibility plugin as a dependency in the debian/control file, but that's just brought up an "unmet build dependency" error.

    Any help would be greatly appreciated.

    Cheers,
    Alyn.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Slocan | # 2 | 2011-02-25, 18:47 | Report

    The QT Quick compatibility plugin 1.0 allows you to use "import QtQuick 1.0" at the top of your QML files. Otherwise, you need to use the "old" standard of "import Qt 4.7". Sounds like you do the former, so if you don't have the plugin installed, your QML files can't be loaded and the app doesn't start properly.

    So, you need to add that plugin to the dependencies in the debian/control file, as you tried to do. But you probably put it at the wrong place when you tried, or had a typo.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to Slocan For This Useful Post:
    alynsparkes, attila77

     
    attila77 | # 3 | 2011-02-25, 19:50 | Report

    Originally Posted by alynsparkes View Post
    Hi,
    I've tried just entering the compatibility plugin as a dependency in the debian/control file, but that's just brought up an "unmet build dependency" error.
    1. Don't touch build-dependency, all you need there is libqt4-dev
    2. Add mcsp to the *binary* package Depends: (also in the control file, but lower)
    ...
    Profit !

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to attila77 For This Useful Post:
    alynsparkes, Slocan

     
    alynsparkes | # 4 | 2011-02-26, 07:08 | Report

    Thanks to both you guys.

    Slocan - you were right, I was using "import QT Quick 1.0" because my app is a development of one of the QTM examples included with the Nokia SDK. As you suggested, I've replaced that with "import QT 4.7" and the app now works without the plugin installed.

    attlia - you were also right, I'd got the dependency in the wrong place in the control file. I didn't have a "depends" line in the package section of the control file, but adding one in did sort the problem too.

    For a first app for the n900 I didn't think I'd done too bad - just needed to sort these last niggly bits out.

    Thanks again.

    Alyn.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout