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.1I have just one qml file main.qml in my project
main.qml is like this
@
import QtQuick 1.0
import Qt 4.7
import QtMultimediaKit 1.1Rectangle {
width: 360
height: 360
Image {
id: thumb
x: 41
y: -45
width: 100
height: 100
source: "img.jpeg"
}
Audio {
id: playMusic
source: "song.mp3"
} MouseArea {
anchors.fill: parentonPressed: { playMusic.play() } }
}
@when i try to run i get the following error
@
module "QtMultimediaKit" is not installed
import QtMultimediaKit 1.1
^
@Can some one help me?
Edit: please use @ tags around your code; Andre
-
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!
-
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.
-
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.
-
[quote author="jech" date="1299335648"]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. [/quote]
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.
-
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.
-
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":http://gstreamer.freedesktop.org/wiki/QtGStreamer. You can read more about it from the main developer "here":http://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.
-
I also encountered the same thing. Is there any solution?
I try this by shullw's posting
bq.
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.
-
mgvali can you post more detailed instructions?