I have both audios:
Audio{
id: win //played when the right rectangle is chosen
source: "../android/assets/win.wav"
}
Audio{
id: lost //played when the wrong rectangle is chosen
source: "../android/assets/lost.wav"
}
and they both should be played under these conditions:
MouseArea{
id: touch_handler
anchors.fill: parent
onClicked: {
if (model.squareColor === pl){ //if rectangle color is correct
win.play() //win plays
}
else {
lost.play() //lost plays
}
}
}
why is that? I already added
QT += multimedia multimediawidgets
is there something else?