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. ListElement property dosen't accept qsTranslate
Forum Updated to NodeBB v4.3 + New Features

ListElement property dosen't accept qsTranslate

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 816 Views 2 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.
  • S Offline
    S Offline
    SeeLook
    wrote on 22 Jan 2017, 11:54 last edited by
    #1

    This one works:

    ListElement {
       text:  qsTr("something to translate")
    }
    

    But this not:

    ListElement {
       text:  qsTranslate("otherContext", "something to translate")
    }
    

    What is wrong?

    R 1 Reply Last reply 23 Jan 2017, 08:20
    0
    • S SeeLook
      22 Jan 2017, 11:54

      This one works:

      ListElement {
         text:  qsTr("something to translate")
      }
      

      But this not:

      ListElement {
         text:  qsTranslate("otherContext", "something to translate")
      }
      

      What is wrong?

      R Offline
      R Offline
      Roumed
      wrote on 23 Jan 2017, 08:20 last edited by
      #2

      @SeeLook

      As for me, it is a surprise that your code works with qsTr.
      I mean due to documentation for qsTrNoOp() you should use EXACTLY one of these helpful methods: , qsTrIdNoOp() , qsTrNoOp() , qsTranslateNoOp(), QT_TR_NOOP() , QT_TRANSLATE_NOOP(), QT_TRID_NOOP() .

      1 Reply Last reply
      3
      • S Offline
        S Offline
        SeeLook
        wrote on 23 Jan 2017, 20:06 last edited by
        #3

        @Roumed Thank You a lot for a clue.

        1 Reply Last reply
        0

        2/3

        23 Jan 2017, 08:20

        • Login

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