Reply
Thread Tools
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#21
Originally Posted by attila77 View Post
libqtm-11 1.1.0-0fn~fremantle7 should have proper(er) import paths. It's still a hack, tho, track http://bugreports.qt.nokia.com/browse/QTMOBILITY-949 if it still causes you pain.

For now, you might need to do something like viewer.engine()->addImportPath(QString("/opt/qtm11/imports"));
I can't get my Qt Mobility working application to work on an actual N900. I've:
  1. Created a blank Qt Quick application in the latest Qt SDK
  2. Uncommented the lines about mobility in the .pro file
  3. Added import QtMobility.sensors 1.1 at the top of my script
  4. Added an Accelerometer component
  5. Run apt-get install libqtm-11-declarative

This works in the simulator, and everything's works as I rotate the screen. So I deployed on to my N900 and I get "module "QtMobility.sensors" is not installed".

I've tried adding the line above to my main.cpp:

Code:
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
    viewer.engine()->addImportPath(QString("/opt/qtm11/imports"));
    viewer.setMainQmlFile(QLatin1String("qml/attitude/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
But now it doesn't compile: invalid use of incomplete type 'struct QDeclarativeEngine'.

Any ideas?
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#22
Did you..

Code:
#include <QtDeclarative>
 

The Following 2 Users Say Thank You to thp For This Useful Post:
Posts: 222 | Thanked: 205 times | Joined on Jul 2009 @ Finland
#23
Originally Posted by Jaffa View Post
But now it doesn't compile: invalid use of incomplete type 'struct QDeclarativeEngine'.

Any ideas?
#include <QDeclarativeEngine>

In Qt Creator, the fact that you don't get autocompletions is a good hint you need to include the header for that class.
__________________
'QtDone'. Getting things done (GTD) was never this cheap!

'QmlReddit' reads Reddit!
 

The Following 2 Users Say Thank You to vivainio For This Useful Post:
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#24
Thanks to Ville, Arek & Thomas, it was indeed missing:

Code:
#include <QtDeclarative>
What is the effect of having the setImports line on Symbian? Or MeeGo? Will it error or be ignored?
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#25
You mean addImportPath ? It works as a path, even if you add non-existent paths, no biggie as long as it *does* find the things it's looking for (the function itself is part of Qt, so whether it's Symbian, Maemo, Desktop... doesn't matter). And I do plan on fixing it (as in making it unnecessary), but it depends on upstream.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following User Says Thank You to attila77 For This Useful Post:
Posts: 654 | Thanked: 664 times | Joined on Feb 2009 @ Germany
#26
There is a bug in Qt Mobility 1.1.1 which prevents audio playback using gstreamer. It occurs on desktop Linux and on Maemo5. The bug is fixed in the 1.1 git branch.

Would it be possible to get that version into Extras-devel? It's even enough to replace plugins/mediaservice/libqgstengine.so. Having no audio playback is (for some apps) a major blocker.
 
Posts: 2 | Thanked: 0 times | Joined on Apr 2011
#27

Last edited by pkliang; 2011-04-03 at 21:15.
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#28
Originally Posted by pkliang View Post
Hi,I couldn't install libqtm-11 on N900 Maemo 5 using apt-get install, can anyone figures out what's wrong?
The command you need is

Code:
apt-get install libqtm-11*
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Apr 2011
#29
Originally Posted by marxian View Post
The command you need is

Code:
apt-get install libqtm-11*
i get it worked, extras-devel wasn't enabled in my repositories,
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#30
Good news everyone, I got 1.1.2 with a few extra Maemo fixes in extras-devel, all interested parties, please try it out !

Note: Since I included the extra Maemo patches I had to go a little ahead of the 1.1.2 tag, so the reported version is actually 1.1.3, but don't let that confuse you, it really is 1.1.2 under the hood.

Originally Posted by conny View Post
There is a bug in Qt Mobility 1.1.1 which prevents audio playback using gstreamer. It occurs on desktop Linux and on Maemo5. The bug is fixed in the 1.1 git branch.

Would it be possible to get that version into Extras-devel? It's even enough to replace plugins/mediaservice/libqgstengine.so. Having no audio playback is (for some apps) a major blocker.
Can you check if the 1.1.2+ I uploaded fixed this ?
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following User Says Thank You to attila77 For This Useful Post:
Reply

Tags
extras-devel, qtmobility

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:15.