以前遇到过这个坑,idapython里想用pyqt做界面会有问题,因为idaq本身也是基于qt的,会崩溃
idapython自己的插件接口只能加工具栏图标/ 菜单选项/ 右键菜单项, 好像并不能做出好看的弹窗,用wxpython或者tkinter太复古。
- before
class Ui_Frame:
...
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
Frame = QtGui.QFrame()
ui = Ui_Frame()
ui.setupUi(Frame)
Frame.show()
sys.exit(app.exec_())
- after
if __name__ == "__main__":
import sys
app = QtGui.QApplication.instance()
if not app:
app = QtGui.QApplication([])
Frame = QtGui.QFrame()
ui = Ui_Frame()
ui.setupUi(Frame)
Frame.show()
app.exec_()