Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Need to stop QML Audio from cpp code

$
0
0
Hi, I have a qml which has audio playing.I need to pause the audio from QAPPlication ie cpp code. * QML CODE is as follows *********************************************************** import Qt 4.7 import QtMultimediaKit 1.1 Text { text: “Click Me!”; font.pointSize: 24; width: 150; height: 50; Audio { id: playMusic source: “music.wav” } MouseArea { id: playArea anchors.fill: parent onPressed: { playMusic.play() } } } ************************************************************ When i hide my qml app ,I need to pause the audio playing. This is straight forward pausing in qml file by using signals and slots I need to pause the audio from cpp code . Please post me

Viewing all articles
Browse latest Browse all 4972

Trending Articles