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

Qt.playSound

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 4.0k 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.
  • J Offline
    J Offline
    jdbastardy
    wrote on last edited by
    #1

    I ws trying to add sound to the SameGame tutorial app. However when I try to use Qt.playSound() (as supposed by using code completion) i get the following error

    @TypeError: Result of expression 'Qt.playSound' [undefined] is not a function.@

    Anybody that knows how to integrate sound?

    http://mattias-cibien.co.cc

    • Prepare for Qt consequences.
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      Qt.playSound() is a function that was available in some of the early pre-releases, but it was removed for the final release. Audio (and video) support in QML is available as part of the multimedia module in Qt Mobility.

      Regards,
      Michael

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jdbastardy
        wrote on last edited by
        #3

        How can I use it in my projects however?

        http://mattias-cibien.co.cc

        • Prepare for Qt consequences.
        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbrasser
          wrote on last edited by
          #4

          You'll need to install Mobility (see "here":http://qt.nokia.com/products/appdev/add-on-products/catalog/4/new-qt-apis/mobility or "here":http://qt.nokia.com/developer/new-qt-apis for the downloads). You can then use the elements as described in the documentation -- for example, here's how you could use the "SoundEffect element":http://doc.qt.nokia.com/qtmobility-1.0/qml-soundeffect.html.

          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