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
Qt 6.11 is out! See what's new in the release blog

ListElement property dosen't accept qsTranslate

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.7k 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.
  • SeeLookS Offline
    SeeLookS Offline
    SeeLook
    wrote on 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
    0
    • SeeLookS SeeLook

      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 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
      • SeeLookS Offline
        SeeLookS Offline
        SeeLook
        wrote on last edited by
        #3

        @Roumed Thank You a lot for a clue.

        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