tr()

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日

原文地址:https://www.cnblogs.com/xingchen/p/2835597.html