On Thursday 18 of March 2010 10:13:31 you wrote:
No, this is not what I am looking for.
I need to translate yes/no buttons in QMessageBox.question() static method.
Now I am using workaround with self method creating custom messagebox with
translated buttons:
QMessageBox b = new QMessageBox(parent);
b.setWindowTitle(title);
b.setText(text);
b.addButton(QCoreApplication.translate("QMessageBox.button", "Yes"),
QMessageBox.ButtonRole.AcceptRole);
b.addButton(QCoreApplication.translate("QMessageBox.button", "No"),
QMessageBox.ButtonRole.RejectRole);
b.show();
int ret = b.exec();
... but it is soooo hacky.
I have found qt_untranslated.ts in qt 4.5.2 sources, but I can't find
the right elements to translate ( QMessageBox doesn't contains buttons texts,
there is
no *StandardButton* category in .ts file and so on ).
> Dusan Zatkovsky wrote:
> > Hi.
> >
> > What is the best way to translate standard buttons in QMessageBox and
> > other qt classes?
> >
> > THX
>
> Isn't this what you're looking for:
>
> http://doc.trolltech.com/qtjambi-4.5.2_01/com/trolltech/qt/qtjambi-i18n.htm
>l
>
> Helge
--
Dusan
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest