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. Qt MultmediaKit

Qt MultmediaKit

Scheduled Pinned Locked Moved QML and Qt Quick
9 Posts 5 Posters 4.3k Views
  • 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.
  • B Offline
    B Offline
    bamsa
    wrote on last edited by
    #1

    Hello,

    I am running QtCreator 2.4.1 Based on Qt 4.7.4 on MacOSX 10.7.2

    If possible I would like to know how to use the Qt MultimediaKit in a QML application and run it in qmlviewer.

    I have been trying to run the following example

    @import Qt 4.7
    import QtMultimediaKit 1.1

    Text {
    text: "Click Me!";
    font.pointSize: 24;
    width: 150; height: 50;

     Audio {
         id: playMusic
         source: "music.wav"
     }
     MouseArea {
         id: playArea
         anchors.fill: parent
         onPressed:  { playMusic.play() }
     }
    

    }@

    But I keep getting the following error message:

    @module "QtMultimediaKit" is not installed
    import QtMultimediaKit 1.1 @

    Is there something I am missing when installing QtSDK? Are there any paths that need to be set? I would really appreciate your help with this issue.

    Best,

    bamsa

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bamsa
      wrote on last edited by
      #2

      Hello,

      I am trying to do the same in MacOS X 10.7.2.

      I am trying to run the following example in qmlviewer:

      @import QtQuick 1.1
      import Qt 4.7
      import QtMultimediaKit 1.1

      Rectangle {
      width: 360
      height: 360

      Audio {
          id: playMusic
          source: "superstar.mp3"
      }
      
      MouseArea {
          id: playArea
          anchors.fill: parent
          onPressed:  { playMusic.play() }
      }
      

      }@

      I copied
      @<path_to>/QtSDK/Simulator/Qt/4.8.0/gcc/imports/QtMultimediaKit@

      to

      @<path_to>/QtSDK/Desktop/Qt/4.8.0/gcc/imports/@

      but I am getting the following error message

      @plugin cannot be loaded for module "QtMultimediaKit": The plugin '<path_to>/QtSDK/Desktop/Qt/4.8.0/gcc/imports/QtMultimediaKit/libdeclarative_multimedia.dylib' uses incompatible Qt library. Expected build key "macosx macx-cocoa g++-4 full-config", got "simulator macosx macx-cocoa g++-4 full-config"
      import QtMultimediaKit 1.1
      ^ @

      Any help with this issue will be really appreciated. I have been struggling with this for a while now.

      Best,

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        I moved the second post from another thread to here, as it seems to be more or less the same topic.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tommyj23
          wrote on last edited by
          #4

          try this:

          when I forget to modify the .pro file the result is the same as yours
          I don´t know if this woks in mac, I use windows, go to your *.pro file and find this two lines:
          @

          CONFIG += mobility

          MOBILITY +=

          @
          now delete this symbol # and this is the result:
          @
          CONFIG += mobility
          MOBILITY += multimedia
          @
          this should works, dont forget to write multimedia

          [Edit: Be sure and wrap code samples in @ tags; mlong]

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bamsa
            wrote on last edited by
            #5

            Hi,

            Thank you very much for your reply.

            Unfortunately, I have tried that before but it didn't work. I keep getting the same error.

            I have an additional question though. Did you go over any particular process to install qt mobility and the multimedia kit in your system? Did you have to set any paths to make it work? Are you using Qt SDK? Which Qt libraries version? I really appreciate your help and time with this.

            Best,

            bamsa

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mece66
              wrote on last edited by
              #6

              I had this problem. Installing the package libdeclarative-multimedia fixed it on Ubuntu.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aabc
                wrote on last edited by
                #7

                Does it work now ?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  aabc
                  wrote on last edited by
                  #8

                  Where from did you get the QtMultimediaKit ?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mece66
                    wrote on last edited by
                    #9

                    [quote author="aabc" date="1352733663"]Does it work now ?[/quote]

                    Yes, works fine.
                    I installed this package: http://packages.ubuntu.com/quantal/libdeclarative-multimedia

                    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