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. Qt Linguist translation error
Forum Updated to NodeBB v4.3 + New Features

Qt Linguist translation error

Scheduled Pinned Locked Moved Unsolved General and Desktop
21 Posts 4 Posters 3.6k 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.
  • ivanicyI ivanicy

    Sorry for bothering so much. I have detected that this method don't translate texts that I have put by coding, for example context menus or treeviews.

    I use

    ui->retranslateUi(this);
    

    Is there something missing to translate the code part as well?

    Thank you and sorry guys :(

    artwawA Offline
    artwawA Offline
    artwaw
    wrote on last edited by
    #21

    @ivanicy A way to avoid this is to update menu strings each time the context menu is displayed (there is a handy signal to connect to - QMenu::aboutToShow() - this way you can use tr().
    As for treeviews, it really depends on how you obtain the data, from and when. Headers, I believe (never tried) could be automated. As for other kind of data, it really depends but can be difficult.

    For more information please re-read.

    Kind Regards,
    Artur

    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