from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4 import QAxContainer
def __init__(self):
super(Example, self).__init__()
self.initUI()
def initUI(self):
self.setCentralWidget(self.frame)
self.frame.setLayout(self.mainLayout)
self.setGeometry(300, 300, 250, 150)
self.setWindowTitle('QuicktimeTest')
QAx_quicktime_control
= QAxContainer.
QAxWidget(self
) QAx_quicktime_control_source
= QAxContainer.
QAxWidget(self
)
self.mainLayout.addWidget(QAx_quicktime_control)
self.mainLayout.addWidget(QAx_quicktime_control_source)
QAx_quicktime_control.setControl('{24BA3CAF-4BE8-4AEC-A7C8-6F47D5684602}')
QAx_quicktime_control_source.setControl('{24BA3CAF-4BE8-4AEC-A7C8-6F47D5684602}')
QAx_quicktime_control_source.setVisible(False)
self.mainLayout.addWidget(textbrower)
textbrower.setHtml(QAx_quicktime_control.generateDocumentation())
QAx_quicktime_control_source.QuickTimeInitialize(0,1)
QAx_quicktime_control_source.CreateNewMovie(False)
QAx_quicktime_control_source.setProperty('Sizing',0)
QAx_quicktime_control_source.setProperty('URL' ,'C:\\Whatever.mov')
QAx_quicktime_control_source.setProperty('FileName' ,'C:\\Whatever.mov')
QAx_quicktime_control_source.setProperty('Sizing',2)
Movie_source = QAx_quicktime_control_source.querySubObject('Movie')
#textbrower.setHtml(Movie_source.generateDocumentation())
duration_source = Movie_source.dynamicCall('Duration').toInt()
#QAx_quicktime_control.QuickTimeInitialize(0,1)
QAx_quicktime_control.CreateNewMovie(False)
Movie = QAx_quicktime_control.querySubObject('Movie')
Movie.SetActive(True)
Movie.SetAllowEditing(True)
duration = Movie.dynamicCall('Duration').toInt()
#Does not workt with InsertSegment or the dynamicCall
Movie.InsertSegment(Movie_source,0,duration_source,duration)
#Movie.dynamicCall('InsertSegment',Movie_source,0,duration_source,duration)
self.show()
def main():
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4 import QAxContainer
class Example(QtGui.QMainWindow):
def __init__(self):
super(Example, self).__init__()
self.initUI()
def initUI(self):
self.frame = QtGui.QFrame()
self.setCentralWidget(self.frame)
self.mainLayout = QtGui.QGridLayout(self)
self.frame.setLayout(self.mainLayout)
self.setGeometry(300, 300, 250, 150)
self.setWindowTitle('QuicktimeTest')
QAx_quicktime_control = QAxContainer.QAxWidget(self)
QAx_quicktime_control_source = QAxContainer.QAxWidget(self)
self.mainLayout.addWidget(QAx_quicktime_control)
self.mainLayout.addWidget(QAx_quicktime_control_source)
QAx_quicktime_control.setControl('{24BA3CAF-4BE8-4AEC-A7C8-6F47D5684602}')
QAx_quicktime_control_source.setControl('{24BA3CAF-4BE8-4AEC-A7C8-6F47D5684602}')
QAx_quicktime_control_source.setVisible(False)
textbrower = QtGui.QTextBrowser()
self.mainLayout.addWidget(textbrower)
textbrower.setHtml(QAx_quicktime_control.generateDocumentation())
QAx_quicktime_control_source.QuickTimeInitialize(0,1)
QAx_quicktime_control_source.CreateNewMovie(False)
QAx_quicktime_control_source.setProperty('Sizing',0)
QAx_quicktime_control_source.setProperty('URL' ,'C:\\Whatever.mov')
QAx_quicktime_control_source.setProperty('FileName' ,'C:\\Whatever.mov')
QAx_quicktime_control_source.setProperty('Sizing',2)
Movie_source = QAx_quicktime_control_source.querySubObject('Movie')
#textbrower.setHtml(Movie_source.generateDocumentation())
duration_source = Movie_source.dynamicCall('Duration').toInt()
#QAx_quicktime_control.QuickTimeInitialize(0,1)
QAx_quicktime_control.CreateNewMovie(False)
Movie = QAx_quicktime_control.querySubObject('Movie')
Movie.SetActive(True)
Movie.SetAllowEditing(True)
duration = Movie.dynamicCall('Duration').toInt()
#Does not workt with InsertSegment or the dynamicCall
Movie.InsertSegment(Movie_source,0,duration_source,duration)
#Movie.dynamicCall('InsertSegment',Movie_source,0,duration_source,duration)
self.show()
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
To copy to clipboard, switch view to plain text mode
Bookmarks