我正在开发一个跨平台的软件,我想编写与平台无关的代码。小问题,我看到很多人报告使用pyqt4的工具提示在Mac上不起作用。这现在解决了吗?
from PyQt4 import QtCore, QtGui
import sys
app = QtGui.QApplication(sys.argv)
QtGui.qApp = app
pointListBox = QtGui.QTreeWidget()
header=QtGui.QTreeWidgetItem(["Tree","First","secondo"])
pointListBox.setHeaderItem(header)
root = QtGui.QTreeWidgetItem(pointListBox, ["root"])
A = QtGui.QTreeWidgetItem(root, ["A"])
barA = QtGui.QTreeWidgetItem(A, ["bar", "i", "ii"])
bazA = QtGui.QTreeWidgetItem(A, ["baz", "a", "b"])
barA.setToolTip(0,"tooltip working")
bazA.setToolTip(0,"tooltip working")
pointListBox.show()
sys.exit(app.exec_())
上述程序中的工具提示适用于Ubuntu和Windows。它是在Mac OS上运行的吗?