For the love of python and qml
Project description
soloman
For the love of python and qml
Installation
pip install soloman
Usage for python
Play audio
from soloman import Audio
aud = Audio()
aud.play('/path/to/music.mp3')
Qml Usage
example.py
import soloman
...
engine = QQmlApplicationEngine()
...
engine.load('example.qml')
Play audio
example.qml
import QtQuick 2.14
...
import soloman 2.1
SAudio {
id: aud
}
Button {
text: "Play"
onClicked: aud.play('path/to/music.mp3')
}
Play videos
example.qml
Play a video file
import QtQuick 2.14
...
import soloman 2.1
SVideo {
id: vid
}
Button {
text: "Play video"
onClicked: vid.play('path/to/video.mp4')
}
Play stills
Option one
...
onClicked: vid.play('path/to/video_stills_01.jpg') # possibly the first image
...
Option two
...
onClicked: vid.play('path/to/') # make sure folder contains only stills
...
Wiki
The wiki can be located here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
soloman-2.1.tar.gz
(6.9 kB
view hashes)
Built Distribution
soloman-2.1-py3-none-any.whl
(8.4 kB
view hashes)