开发者

How to load qt linguist dynamically changed label text

In my project i'm trying to use qt linguist. When i change the language fr开发者_C百科om English to Turkish, it is working all constant label.

But some labels i m loading them dynamically according to scenario of use cases.

Whatever i do with qt linguist, it doest workthe texts of these label.

How can i get rid of this problem?

Any help will be apprecialted


Qt has a guide to internationalization, which includes the basic information: to wrap your string in a tr function call.

label->setText( tr( "Hello, World!" ) );

In addition to this, if you want the language to change on the fly, you'll need to identify when the context has changed, and update your labels appropriately. Unfortunately, I can't easily put my hands on the signal that indicates when to do so.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜