-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Amoh Gyebi Ampofo edited this page Apr 12, 2021
·
8 revisions
Welcome to the soloman wiki!
pip install soloman
from soloman import Audio
aud = Audio()
aud.play('/path/to/music.mp3')
example.py
import soloman
...
engine = QQmlApplicationEngine()
...
engine.load('example.qml')
example.qml
import QtQuick 2.15
...
import soloman 2.5
SAudio {
id: aud
}
Button {
text: "Play"
onClicked: aud.play('path/to/music.mp3')
}
example.qml
import QtQuick 2.15
...
import soloman 2.5
SVideo {
id: vid
}
Button {
text: "Play video"
onClicked: vid.play('path/to/video.mp4')
}
...
onClicked: vid.play('path/to/video_stills_01.jpg') # possibly the first image
...
...
onClicked: vid.play('path/to/') # make sure folder contains only stills
...