get paid to paste

121212121231

import sys
from PyQt4 import QtCore, QtGui
from gui import Ui_Form

class StartQT4(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Form()
        self.ui.setupUi(self)

	def play_file(self): #Added, but needs to be connected to the Radio Button labeled "Play"
            source = Phonon.MediaSource(song.mp3)
            self.media_object.setCurrentSource(source)
            self.media_object.play()
#Also, after it is connected, will it start playing the .mp3? After getting it to play, i can figure out stop and pause.


if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    myapp = StartQT4()
    myapp.show()
    sys.exit(app.exec_())

Pasted: Oct 14, 2011, 4:10:26 pm
Views: 9