# pyqt5界面打开flash.swf文件 from PyQt5 import QtCore, QtGui, QAxContainer, QtWidgets class Ui_Flash(QAxContainer.QAxWidget): def __init__(self, parent=None): super(Ui_Flash, self).__init__() self.resize(800, 600) # 设置窗口的大小 self.setControl("{D27CDB6E-AE6D-11cf-96B8-444553540000}") # flash的com接口 self.dynamicCall("LoadMovie(long,string)", 0, r"C:\Users\ming\Desktop\aa\第二十章电与磁\4 电铃-好.swf") #装载swf文件 self.show() if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) ui = Ui_Flash() ui.show() sys.exit(app.exec_())