<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Le 26/03/11 13:36, Frank Xu a écrit :
    <blockquote
      cite="mid:AANLkTik5pXYCy2=X7hRoQKi88J6gm=1vJdTjDMz0ssM1@mail.gmail.com"
      type="cite">Hi all:<br>
      <br>
      I use python's method to translate ( I mean use "_" method ), no
      problem in most cases, but for example, I can't translate the OK
      button in QMessageBox.<br>
      <br>
      Thank you.<br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
PyQt mailing list    <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
    </blockquote>
    You need to use the value of the button<br>
    <br>
    messageBox.setButtonText(1024, _("Accept"))<br>
    messageBox.setButtonText(8388608, _("Ignore"))<br>
    <br>
    Enums are decribe here:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qmessagebox.html#StandardButton-enum">http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qmessagebox.html#StandardButton-enum</a><br>
    <br>
    <div class="moz-signature">-- <br>
      Vincent V.V.<br>
      <a href="https://launchpad.net/oqapy">Oqapy</a></div>
  </body>
</html>