Important: Please read the Qt Code of Conduct -

[SOLVED] ListElement and QT_TR_NOOP()

  • I have such code:
    @ListModel {
    id: langModel

                    ListElement {
                        fullName: QT_TR_NOOP("Russian")
                        shortName: "Ru"
                    ListElement {
                        fullName: QT_TR_NOOP("English")
                        shortName: "En"
                    } 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

  • ok, solved. Removed from unanswered list

Log in to reply