February 8, 2011

kibsoft kibsoft
Lab Rat
50 posts

[SOLVED] ListElement and QT_TR_NOOP()


I have such code:

  1. ListModel {
  2.                     id: langModel
  4.                     ListElement {
  5.                         fullName: QT_TR_NOOP("Russian")
  6.                         shortName: "Ru"
  7.                     }
  8.                     ListElement {
  9.                         fullName: QT_TR_NOOP("English")
  10.                         shortName: "En"
  11.                     } and etc.

I got .ts file from this .qml and translated it.. After that I installed .qm file to app: installTranslator(), but these string weren’t translated. Although other string with qsTr() script were translated.. So how I can fix this issue?

P.S. I tried hellotr example, and replaced qsTr() with QT_TR_NOOP().. Translation doesn’t work anymore (for hellotr example) :)

Solution is: qsTr(fullName) in the delegate
link: http://bugreports.qt.nokia.com/browse/QTBUG-11403

1 reply

February 28, 2011

stuk stuk
Ant Farmer
523 posts

ok, solved. Removed from unanswered list

  ‹‹ [Solved] Create listmodel in a function      WebView crashing on Today’s (Feb 8) google homepage ››

You must log in to post a reply. Not a member yet? Register here!