di_zou
5th November 2009, 19:29
I am trying to use this function in PyQt:
http://doc.trolltech.com/4.3/qcoreapplication.html#translate
I am getting this error message when I have all three arguments:
newAct = QtGui.QAction(QtGui.qApp.translate("&New...", 0, QtCore.QTextCodec.codecForTr()), self)
TypeError: argument 2 of QCoreApplication.translate() has an invalid type
And I am getting this error message when I only have one argument:
newAct = QtGui.QAction(QtGui.qApp.translate("&New..."), self)
TypeError: insufficient number of arguments to QCoreApplication.translate()
What do I put in for the arguments?
http://doc.trolltech.com/4.3/qcoreapplication.html#translate
I am getting this error message when I have all three arguments:
newAct = QtGui.QAction(QtGui.qApp.translate("&New...", 0, QtCore.QTextCodec.codecForTr()), self)
TypeError: argument 2 of QCoreApplication.translate() has an invalid type
And I am getting this error message when I only have one argument:
newAct = QtGui.QAction(QtGui.qApp.translate("&New..."), self)
TypeError: insufficient number of arguments to QCoreApplication.translate()
What do I put in for the arguments?