Skip to main content

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


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)

Uploaded Source

Built Distribution

soloman-2.1-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page