Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Where to set the tr for translation

Where to set the tr for translation

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 377 Views
  • 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.
  • L Offline
    L Offline
    Leopold
    wrote on last edited by
    #1

    Hello, new problem.
    Where do I have to set the tr for translation?```
    tempItem->setData(Qt::DisplayRole, QStringLiteral(tr("1 rpm right axis")));

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      tr already returns a QString, you don't need QStringLiteral

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • L Offline
        L Offline
        Leopold
        wrote on last edited by
        #3

        Thank you VRonin,it works.
        Where can I read more about this topic?

        jsulmJ 1 Reply Last reply
        0
        • L Leopold

          Thank you VRonin,it works.
          Where can I read more about this topic?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Leopold https://doc.qt.io/qt-5/internationalization.html
          https://doc.qt.io/qt-5/qobject.html#tr

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Leopold
            wrote on last edited by
            #5

            thank you jsulm, i will have a look!

            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