March 4, 2011

kishore kishore
Lab Rat
3 posts

unable to import QtMultimediaKit 1.1 in a Qt Quick application

 

I am trying to use the QtMultimediaKit 1.1 for using Audio and Video elements.
I am trying to do as instructed in this page http://doc.qt.nokia.com/qtmobility/qml-multimedia.html
I have also installed the newest qtsdk 1.1

I have just one qml file main.qml in my project

main.qml is like this

  1. import QtQuick 1.0
  2. import Qt 4.7
  3. import QtMultimediaKit 1.1
  4.  
  5.  
  6. Rectangle {
  7.     width: 360
  8.     height: 360
  9.     Image {
  10.         id: thumb
  11.         x: 41
  12.         y: -45
  13.         width: 100
  14.         height: 100
  15.         source: "img.jpeg"
  16.     }
  17.     Audio {
  18.             id: playMusic
  19.             source: "song.mp3"
  20.         }    MouseArea {
  21.         anchors.fill: parent
  22.  
  23.             onPressed:  { playMusic.play() }
  24.  
  25.     }
  26. }

when i try to run i get the following error

  1. module "QtMultimediaKit" is not installed
  2.      import QtMultimediaKit 1.1
  3.      ^

Can some one help me?

Edit: please use @ tags around your code; Andre

 Signature 

Kishore

14 replies

March 4, 2011

kishore kishore
Lab Rat
3 posts

When i try to view main.qml file in designer mode i get module “QtMultimediaKit” is not installed(3:1)

 Signature 

Kishore

March 4, 2011

weeezes weeezes
Lab Rat
4 posts

I have a similiar problem.

Seems like the new SDK (1.1 beta) hasn’t installed the Qt Mobility API’s at all? I add the required things to the .pro file (CONFIG MOBILITY, or something similiar to this. It was in the .pro file from the beginning, I just had un-comment those lines and add mobility to CONFIG and multimedia to MOBILITY), but I still can’t import anything from the api into any C++ or QML file.

I still seem to find some Mobility files from the SDK install folder.

How do I get to them? Is there any other things one needs to do to get to use the API?

Thank you very much for your intrest!

March 5, 2011

borut123 borut123
Lab Rat
72 posts

works for me.

.pro file:
CONFIG += mobility
MOBILITY += multimedia

in qml file:
import Qt 4.7
import QtMultimediaKit 1.1

Which platform are you trying to compile for? I use Symbian 3

March 5, 2011

weeezes weeezes
Lab Rat
4 posts

Thanks for the reply!

That’s exactly what I have done, but for some reason nothing from mobility can be imported. The 1.1 beta SDK has installed successfully, so I don’t really have a clue of what its wrong..

Its there something one needs to do manually to access mobility after the sdk installation? Configure something or such.

March 5, 2011

kishore kishore
Lab Rat
3 posts

I could build the same project using remote compiler and get sis file on my desktop. when i install the sis file they work perfectly.
I think that there is some API missing with QTSDK 1.1.

 Signature 

Kishore

March 5, 2011

jech jech
Ant Farmer
128 posts

I have the same problem. I installed the QtSDK 1.1 but I can’t import QtMultimediaKit 1.1. I get the same error message saying that it is not installed.

I do believe it is installed because I have in my computer file C:\QtSDK\Desktop\Qt\4.7.2\mingw\bin\QtMultimedia4.dll.

March 8, 2011

jech jech
Ant Farmer
128 posts

Bump!

Any ideas, please?

March 9, 2011

derick derick
Lab Rat
3 posts

jech wrote:
I have the same problem. I installed the QtSDK 1.1 but I can’t import QtMultimediaKit 1.1. I get the same error message saying that it is not installed.

I do believe it is installed because I have in my computer file C:\QtSDK\Desktop\Qt\4.7.2\mingw\bin\QtMultimedia4.dll.

That file belongs to the Qt multimedia module and not mobility.
The mobility/multimedia library is called QtMultimediaKit.

There should be this directory: C:\PATH_TO_YOUR_QT_TREE\imports\QtMultimiedaKit.
with the QtMultimediaKit plugin contained in that directory.
It it’s not there, mobility is probably not installed or installed incorrectly.

You can of course download mobility from source and compile and install it yourself.

March 9, 2011

derick derick
Lab Rat
3 posts

correction: I meant the QtMultimediaKit declarative plugin should be in C:\PATH_TO_YOUR_QT_TREE\imports\QtMultimiedaKit.

March 9, 2011

jech jech
Ant Farmer
128 posts

OK, this is the problem. In the “imports” directory I only have Qt and QtWebKit subdirectories.

I tried to compile QtMobility myself, but I keep getting message during configure that DirectShow was not found. I tried both MSVC 2008 and MinGW with the same result.

March 9, 2011

Duff Duff
Ant Farmer
52 posts

Same old story. QtMultimedia on the desktop with QML is not supported in the new SDK. This has been going on for quite a while now. I was once able to get mobility compiled separately and had a QML video element working on Linux. However, I was never able to get that to work on Windows. If you read the release notes carefully you will see that the mobility stuff is supported for Symbian but there is no mention of the desktop.

Don’t hold your breath either, as we all know, focus on the desktop is a thing of the past at Nokia. Our best hope for QML multimedia integration is QtGstreamer [gstreamer.freedesktop.org]. You can read more about it from the main developer here [gkiagia.wordpress.com]. Notice in the todo list on the QtGstreamer site that QML integration is listed. It is promising work and there is even mention (on gkiagia’s blog) that it was sponsored by Nokia. You probably will not get any official word in this forum regarding multimedia on the desktop (outside of phonon). Its a subject they like to avoid. They should probably be more clear in their documentation that it is not really supported but I don’t think they care much about the non commercial users frustration over this issue. Maybe you would have more luck if you were a commercial license user. Remember that the engineers from Nokia that hang out in the forums are not support workers. Chances are that if something is not supported in their minds (regardless of how clear they have made that fact in their documentation) they are not likely to get into a discussion about it here. Still, the QtGstreamer stuff does look pretty promising and if you are impatient you might be able to get a standard QtGstreamer video player working from the example code provided on the site and integrate that player with your QML GUI.

 Signature 

—Duff

May 30, 2011

franziss franziss
Lab Rat
50 posts

I also encountered the same thing. Is there any solution?

I try this by shullw’s posting

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.
bq.

But it doesn’t work for me. I am on a windows vista.

Does anyone knows the solution? Thank you for your kind help.

October 19, 2011

mgvali mgvali
Lab Rat
2 posts

Build qt-mobility-opensource-src against gstreamer libraries on linux, then add the install location to Qt Creator. apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

July 26, 2012

bluestreak bluestreak
Lab Rat
33 posts

mgvali can you post more detailed instructions?

 
  ‹‹ QDeclarativeView problem      Updating a text field from onClicked twice not working ››

You must log in to post a reply. Not a member yet? Register here!