Qt.playSound
-
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?
-
How can I use it in my projects however?
-
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.