''' ps_test_QSound1.py
a simple template to test PySide widgets like QSound

PySide is the official LGPL-licensed version of PyQT
for free PySide Windows installers see:
http://developer.qt.nokia.com/wiki/PySide_Binaries_Windows
or
http://www.lfd.uci.edu/~gohlke/pythonlibs/
tested with Python33 and Pyside112  by vegaseat  29jul2013
'''

import time
from PySide.QtCore import *
from PySide.QtGui import *

# replace [] with sys.argv for command line option
app = QApplication([])

# ----- start your widget test code ----

# pick a sound file (.wav only) you have
sound_file = "Pop.wav"
QSound.play(sound_file)

# create a label to show file (allows for proper exit too)
label = QLabel(sound_file)
label.show()

# ---- end of widget test code -----

app.exec_()
1
Contributor
1
Reply
14
Views
3 Years
Discussion Span
Last Post by vegaseat
0

Mac OS X All sound file formats that NSSound supports, including QuickTime formats.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.