Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] ListElement and QT_TR_NOOP()
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] ListElement and QT_TR_NOOP()

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kibsoft
    wrote on last edited by
    #1

    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
    link: http://bugreports.qt.nokia.com/browse/QTBUG-11403

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stukdev
      wrote on last edited by
      #2

      ok, solved. Removed from unanswered list

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved