当我尝试用pyqt4应用程序创建一个onefile exe时,我有4个脚本组成了整个程序。我已经创建了一个exe,但是当我执行文件时,我从追溯中获取了
file "<string>" line 172 in <module>
file "<string>" line 33 in __init__
AttributeError: 'QAction' object has no attribute 'activated'
不知道我可能会缺少什么。我遵循了pyinstaller文档。任何帮助都将受到高度赞赏。
这些线路已激活
self.ui.actionExport_Database.activated.connect(self.dbexport)
self.ui.actionExport_Entire_Database.activated.connect(self.dbexportall)
self.ui.actionClose.activated.connect(self.close)
我用于exe的命令是
python pyinstaller.py --onefile yourprogram.pyw
python pyinstaller.py --onefile your-program.spec
不知道我是否应该等到第二个命令使用onefile选项。
阿晨1998
相关分类