[SOLVED]QML+QtMultimediaKit to play audio on n900
-
Since someone actually replied, I will detail what I had to do to get this working.
- You will need root access to your n900. rootsh is the program for that. In terminal now do the following
sudo gainroot
apt-get install libqtm-11
That's it for the libraries. There are posts out there that say to move stuff. Those are outdated. The newer versions install in the correct directories.
2.I had to remove the Item "parent" in my code. The n900 doesn't like an undefined width and height parent. Now since you should have
@
viewer.showExpanded();
@
in your .cpp what you actually define it won't matter because this will set it to the size of the phone.- To make sure you get to the libraries you need to add this to your .cpp file
@
#include <QtDeclarative>
@
and inside your viewer loader add
@
viewer.engine()->addImportPath(QString("/opt/qtm11/imports"));
@ - Now on to your .pro file. One quick change here lets you make the code for Symbian(as I have read, because I don't have a Symbian phone to test my app on I can only relay what I have read, man I want one though to see if it works) you need to add this.
@
maemo5 {
CONFIG += mobility11
} else {
CONFIG += mobility
}
MOBILITY += multimedia
@ - Now at the start of your .qml file just put
@
import Qt 4.7
import QtMultimediaKit 1.1
@
and you are dialed. Have fun! I know I am now that I sorted a million posts out and got this working. Hopefully I can save some other starting folks some time.
- You will need root access to your n900. rootsh is the program for that. In terminal now do the following
-
Try building it in the simulator. If it gives the same error try adding this to your PATH on the computer you have QtCreator installed. C:\QtSDK\Simulator\QtMobility\mingw\lib It is almost like it isn't seeing the libraries in the SDK to build it. If that doesn't work you might have to install QtMobility on your machine outside of the SDK. I had done that but didn't think that is what made the difference. I guess I was totally wrong. If you have to do that google the source code for QtMobility 1.1 and download the source and follow the directions here.
http://qt-mobility.blogspot.com/2010/01/installing-qt-mobility-on-windows-7.html
I have Vista and it is running fine. It is a very simple process so don't feel overwhelmed.
-
Hi,
I am facing similar issue “module “QtMultimediaKit” is not installed “ on Centos Linux. I have my libs ,imports and plugins in /usr/local/lib on my embedded target
I have the following env variables set
export QT_PLUGIN_PATH=”/usr/local/lib/plugins”
export QML_IMPORT_PATH=”/usr/local/lib/imports”
In Imports Folder, i have the following
ls /usr/local/lib/imports
QtMultimediaKit
ls /usr/local/lib/imports/QtMultimediaKit/
libdeclarative_multimedia.so qmldir
ls /usr/local/lib/plugins/
accessible imageformats playlistformats webkit
bearer kbddrivers qmltooling
gfxdrivers mediaservice script
iconengines mousedrivers sqldrivers
I tried with the following qml
import Qt 4.7 import QtMultimediaKit 1.1 Rectangle { id: page width: 300; height:200 color: “lightgray” Text { id: helloText text: “Hello world!” y: 30 anchors.horizontalCenter: page.horizontalCenter font.pointSize: 10; font.bold: true } Audio { id: playMusic source: “audio.wav” } MouseArea { id: playArea anchors.fill: parent onPressed: { playMusic.play() } } }
In the PRO file , I have the following
QT += declarative multimedia
+CONFIG += mobility
+MOBILITY = multimedia
Inspite all these changes I am seeing the issue “module “QtMultimediaKit” is not installed”.
QT – v4.7.4
Mobility – v1.2
Can Anyone help me what has gone wrong ?