Congratulations to our 2022 Qt Champions!

Dynamic Qt Translation?

  • Hi All,
    It seems like , Qt Translation works only for static content and not for dynamic.

    can any one please tell me how to handle this situation.

    case: I want to fill a combobox with items by reading a xml file content.

    items.xml will look like this,


  • You can create the ts files by hand. If you do that and load the translated files with a QTranslator, you can call QObject::tr with a dynamic pointer.

  • Hi Gerolf,

          I know the process but i have some other doubts, i will get back soon.

Log in to reply