Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qtpy: add support for qtpy.QtMultimedia
Add a wrapper around QtMultimedia to provide access to QAudio, QSound and friends. Closes #49 Signed-off-by: David Aguilar <davvid@gmail.com>
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from qtpy import PYQT5 | ||
from qtpy import PYQT4 | ||
from qtpy import PYSIDE | ||
|
||
|
||
if PYQT5: | ||
from PyQt5.QtMultimedia import * | ||
elif PYQT4: | ||
from PyQt4.QtMultimedia import * | ||
from PyQt4.QtGui import QSound | ||
elif PYSIDE: | ||
from PySide.QtMultimedia import * | ||
from PySide.QtGui import QSound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import absolute_import | ||
|
||
from qtpy import QtMultimedia | ||
|
||
|
||
def test_qtmultimedia(): | ||
"""Test the qtpy.QtMultimedia namespace""" | ||
assert QtMultimedia.QAbstractVideoBuffer is not None | ||
assert QtMultimedia.QAudio is not None | ||
assert QtMultimedia.QAudioDeviceInfo is not None | ||
assert QtMultimedia.QAudioInput is not None | ||
assert QtMultimedia.QSound is not None |