Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Unable to import QtMultimediaKit 1.1 in a Qt Quick application
Forum Updated to NodeBB v4.3 + New Features

Unable to import QtMultimediaKit 1.1 in a Qt Quick application

Scheduled Pinned Locked Moved QML and Qt Quick
15 Posts 9 Posters 12.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kishore
    wrote on last edited by
    #1

    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

    @
    import QtQuick 1.0
    import Qt 4.7
    import QtMultimediaKit 1.1

    Rectangle {
    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: parent

            onPressed:  { 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

    Kishore

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kishore
      wrote on last edited by
      #2

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

      Kishore

      1 Reply Last reply
      0
      • W Offline
        W Offline
        weeezes
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0
        • B Offline
          B Offline
          borut123
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • W Offline
            W Offline
            weeezes
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kishore
              wrote on last edited by
              #6

              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.

              Kishore

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jech
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jech
                  wrote on last edited by
                  #8

                  Bump!

                  Any ideas, please?

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    derick
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      derick
                      wrote on last edited by
                      #10

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

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        jech
                        wrote on last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          Duff
                          wrote on last edited by
                          #12

                          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.

                          --Duff

                          1 Reply Last reply
                          0
                          • F Offline
                            F Offline
                            franziss
                            wrote on last edited by
                            #13

                            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.

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mgvali
                              wrote on last edited by
                              #14

                              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

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                bluestreak
                                wrote on last edited by
                                #15

                                mgvali can you post more detailed instructions?

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved