用于 throublshooting 而不是打印命令 pyqt 的对话框

a dialog for throublshooting instead of print command pyqt

本文关键字:命令 pyqt 对话框 打印 throublshooting 用于      更新时间:2023-10-16

>我有一个code,继承自一个Qt class,所以:

print mystr.encode("utf-8")

给我以下错误:

AttributeError: 'QString' object has no attribute 'encode'

所以,我决定使用Qt ready dialog,因为我知道它对throublshooting有相同的dialog,例如JavaScript中的alert,我的同事也在C++同样的东西中使用。

问题:他们function的名字是什么?

QMessageBox.information(...)

它的 API 参考-http://pyqt.sourceforge.net/Docs/PyQt4/qmessagebox.html#information