[Solved]QButtonBox translation
-
Hi guys,
I wanna translate ok or cancel in QButtonBox to anyother language, some guys suggest me do something like this:
@
buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Ok"));
buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
@
and then I execute lupdate and generate the .ts file, but, there are not any way to translate those two items when I open .ts file by using linguist, because ok and cancel is noe list in source text pane.welcome any ideas. thanks a lot
[Edit: Be sure and wrap your code in @-tags -- mlong]
-
I have been using translation in a common way without any problems. Read carefully "Qt Linguist manual":http://qt-project.org/doc/qt-4.8/linguist-manager.html and make sure that lupdate has produced a valid ts file that is up to date.
-
Qt has translations for those:
http://lists.trolltech.com/qt-interest/2006-11/thread00779-0.html