博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

tr()

Posted on 2012-12-27 13:59  星尘的天空  阅读(203)  评论(0编辑  收藏  举报

tr()

The tr() function calls around the string literals mark them for translation to other languages. The function is declared in QObject and every subclass that contains the Q_OBJECT macro. It's a good habit to surround user-visible strings with tr(), even if you don't have immediate plans for translating your applications to other languages. We cover translating Qt applications in Chapter 18.

example :label = new QLabel(tr("Find &what:"));

THE END!

2012年12月27日