maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   QML dependencies (https://talk.maemo.org/showthread.php?t=70345)

alynsparkes 2011-02-25 16:44

QML dependencies
 
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.

Slocan 2011-02-25 18:47

Re: QML dependencies
 
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.

attila77 2011-02-25 19:50

Re: QML dependencies
 
Quote:

Originally Posted by alynsparkes (Post 955327)
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 !

alynsparkes 2011-02-26 07:08

Re: QML dependencies
 
Thanks to both you guys.:D

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.


All times are GMT. The time now is 09:10.

vBulletin® Version 3.8.8