Im trying to create a simple radio app on Ubuntu Touch using the development tool "clickable" yet I cant seem to wrap my head around how to install required QML components.
MediaPlayer {
id: player
source: "https://<some url>.mp3"
onStatusChanged: {
if (status == MediaPlayer.EndOfMedia) {
button.pressed = false
button.text = i18n.tr("Play")
}
}
}
Button {
anchors.centerIn: parent
id: button
text: i18n.tr("Play")
pressed: false
onClicked: {
if (player.playbackState == 1){
player.stop()
pressed = false
text = i18n.tr("Play")
}
else{
pressed = true
text = i18n.tr("Stop")
player.play()
}
}
}
}
The above code results in the following error
..../Main.qml:39 MediaPlayer is not a type
I've tried installing QTmultimedia using apt-get, with no result. How am I suppose to locally add this component to the project? The project seems to have is own version of QML locally
Depending on your Qt version and your build system (CMake or qmake) you need to link against the corresponding C++ libraries
qmake
CMake