Home · All Classes · All Functions · Overviews

QML SoundEffect Element Reference

The SoundEffect element provides a way to play sound effects in qml. More...

Properties

Signals

Detailed Description

The following example plays a wav file on mouse click.

 SoundEffect {
     id: playSound
     source: "test.wav"
 }
 MouseRegion {
     id: playArea
     anchors.fill: parent
     onPressed: {
         playSound.play()
     }
 }

See also SoundEffect.


Property Documentation

read-onlyduration : int

This property holds the duration in milliseconds of the current source audio.


loopCount : int

This property provides a way to control the number of times to repeat the sound on each play().


muted : bool

This property provides a way to control muting.


source : QUrl

This property provides a way to control the sound to play.


volume : int

This property provides a way to control the volume for playback.


Signal Documentation

SoundEffect::durationChanged ()

This handler is called when the duration has changed.


SoundEffect::loopCountChanged ()

This handler is called when the number of loops has changes.


SoundEffect::mutedChanged ()

This handler is called when the mute state has changed.


SoundEffect::sourceChanged ()

This handler is called when the source has changed.


SoundEffect::volumeChanged ()

This handler is called when the volume has changed.



Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.7.0