Home > Mobile >  The string of qt lupdate don't recognize the tr package
The string of qt lupdate don't recognize the tr package

Time:09-17

I've been in. Add the pro. Ts file, and use the tr function class has Q_OBJECT, but function in the string is unable to be extracted, can only extract UI control string
See a statement is to ensure that. H file and. CPP file coding consistent? But I is utf-8, what how should solve?
. This is the ts file, I test the window of the and the readme
button<? The XML version="1.0" encoding="utf-8"?>


MainWindow

MainWindow



Save the file & lt;/source>



ReadMe





But actually wrote in function in the

I don't know why we couldn't identify the tr, why ah!

CodePudding user response:

Qmake first, lupdate again

CodePudding user response:

reference 1/f, non Yi response:
qmake first, then lupdate

Tried, useless, I just changed a computer, this company computer is Windows 7,
Now can only use another computer translation,

CodePudding user response:

Windows 7 is toxic, I use two Windows 7 of the company are not, I bring your own doing, clothing,

CodePudding user response:

The usage you puzzling, tr is static functions, you who this test to assign a value to use ah, in addition the tr is a member of the qobject function, and mainfrm from qobject inheritance, with tr can be directly, that the trying ascription problem involves the translation of the test

Qstring a=tr (" test!" ); Can be

CodePudding user response:



reference 4 floor taitanyt response:
do you have in this usage puzzling, tr is static functions, you who this test to assign a value to use ah, in addition the tr is a member of the qobject function, and mainfrm from qobject inheritance, with tr can be directly, that the trying ascription problem involves the translation of the test

Qstring a=tr (" test!" ); You can

Well, in fact, the last is the company's encryption software, written with me it doesn't matter, forget to come back before the knot posted, thank you
  •  Tags:  
  • Qt
  • Related