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. How can dynamic control change in widget application

How can dynamic control change in widget application

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 215 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    How can dynamic control change the language if I want to use Linguist in a widget application project?

    Is there a way to use String in resource management other than using Linguist?

    1 Reply Last reply
    0
    • HansonH Offline
      HansonH Offline
      Hanson
      wrote on last edited by
      #2

      If you mean to change the language when you are using the app,you can try this:

      QTranslator translator;
      translator.load("other_language");
      qApp->installTranslator(&translator);
      

      So the string use tr() will change to other language.And you have to call another func to update the UI:

      ui->retranslateUi(yourwidget);
      

      As the "Is there a way to use String in resource management other than using Linguist?"
      I think you can use the dll to store the string resource, and dynamic to load this dll, and to load the string when run the app.

      “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
      —— Martin Golding

      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