Results 1 to 1 of 1

Thread: PyQt QtGui.qApp.translate question[RESOLVED]

  1. #1
    Join Date
    Sep 2009
    Posts
    60
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default PyQt QtGui.qApp.translate question[RESOLVED]

    I am trying to use this function in PyQt:
    http://doc.trolltech.com/4.3/qcoreap...html#translate
    I am getting this error message when I have all three arguments:
    Qt Code:
    1. newAct = QtGui.QAction(QtGui.qApp.translate("&New...", 0, QtCore.QTextCodec.codecForTr()), self)
    2. TypeError: argument 2 of QCoreApplication.translate() has an invalid type
    To copy to clipboard, switch view to plain text mode 
    And I am getting this error message when I only have one argument:
    Qt Code:
    1. newAct = QtGui.QAction(QtGui.qApp.translate("&New..."), self)
    2. TypeError: insufficient number of arguments to QCoreApplication.translate()
    To copy to clipboard, switch view to plain text mode 
    What do I put in for the arguments?
    Last edited by di_zou; 5th November 2009 at 20:48.

Similar Threads

  1. QString::toStdString in PyQt Question
    By di_zou in forum Newbie
    Replies: 1
    Last Post: 2nd November 2009, 20:09
  2. QMovie supports no animation formats (PyQt on Windows)
    By jmeyer in forum Qt Programming
    Replies: 3
    Last Post: 5th May 2009, 08:44
  3. Replies: 1
    Last Post: 30th July 2008, 23:39
  4. Question about QCalendarWidget with PyQT
    By hf in forum Qt Programming
    Replies: 2
    Last Post: 21st April 2008, 22:40
  5. PyQt QTimer problem { FIXED }
    By WinchellChung in forum Newbie
    Replies: 0
    Last Post: 1st March 2008, 16:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.