SoundEffect not playing sound.I put "fixed.wav" file on the same folder.
-
SoundEffect not playing sound.I put fixed.wav file on the same folder
@
Below is my code 'qml file'import QtQuick 1.0
import Qt 4.7
import QtMultimediaKit 1.1Rectangle {
width: 360
height: 640Text { id:textlabel x: 81 y: 131 text: "Click Me!"; font.pointSize: 24; width: 150; height: 50; SoundEffect { id: playsound source: "fixed.wav" } MouseArea { id: playArea x: -23 y: 1 anchors.rightMargin: 23 anchors.bottomMargin: -1 anchors.leftMargin: -23 anchors.topMargin: 1 anchors.fill: parent onPressed: { playsound.play() } } }
}
@
-
When i put
source: "file:///D:/QtSDK/Examples/4.7/declarative/demos/samegame/qml/fixed.wav"
its working but when i put,
source: "fixed.wav"
it is not working.please reply.
@SoundEffect {
id: playsound
source: "fixed.wav"
//source: "file:///D:/QtSDK/Examples/4.7/declarative/demos/samegame/qml/fixed.wav"}@
-
I have already add these lines on my project file,the main concern is about the source of the soundeffect. as i mentioned in my last reply.