diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-04-01 06:47:19 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-04-01 06:47:19 (GMT) |
commit | 621a470e1c996c471a5a4492a0b71a75b1add6d4 (patch) | |
tree | 5c0894d25eaea93bb7e931bafdd09708294e12ce /src/multimedia | |
parent | 006d3ee14b37f243ef4765d4252cfb1a61648f14 (diff) | |
download | Qt-621a470e1c996c471a5a4492a0b71a75b1add6d4.zip Qt-621a470e1c996c471a5a4492a0b71a75b1add6d4.tar.gz Qt-621a470e1c996c471a5a4492a0b71a75b1add6d4.tar.bz2 |
Add media elements to the QML Elements docs.
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/effects/qsoundeffect.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp index ed9ab3f..8a38103 100644 --- a/src/multimedia/effects/qsoundeffect.cpp +++ b/src/multimedia/effects/qsoundeffect.cpp @@ -56,18 +56,25 @@ QT_BEGIN_NAMESPACE \since 4.7 \brief The SoundEffect element provides a way to play sound effects in qml. + This element is part of the \bold{Qt.multimedia 4.7} module. + The following example plays a wav file on mouse click. \qml - SoundEffect { - id: playSound - source: "test.wav" - } - MouseArea { - id: playArea - anchors.fill: parent - onPressed: { - playSound.play() + import Qt 4.6 + import Qt.multimedia 4.7 + + Item { + SoundEffect { + id: playSound + source: "test.wav" + } + MouseArea { + id: playArea + anchors.fill: parent + onPressed: { + playSound.play() + } } } \endqml |