How can I easily translate standard buttons (Yes, No) from QMessageBox? I can't use self.tr on those arguments, so I would like to achieve it in some other simple way. Do I have to use whole translation system?
+2
A:
Are you sure you have to translate them yourself? In other toolkits, standard buttons are automatically translated to the language that the user is using.
DoR
2009-11-10 17:59:54
No, I would prefer to have them translated automatically. But I have no idea how to achieve this.
gruszczy
2009-11-12 15:11:54
What OS are you using? Have you tried logging in using a different language?
DoR
2009-11-12 16:21:36
Ubuntu 9.10 I have everything in polish.
gruszczy
2009-11-13 12:13:18
+1
A:
The quickest way is something like this:
mymessagebox.button(mymessagebox.Yes).setText("Yes, please!")
mymessagebox.button(mymessagebox.No).setText("No, thanks.")
See the QMessageBox documentation for all possible standard buttons.
balpha
2009-11-19 13:41:42