ui拖入控件label
Qt--菜单栏--View--Widget Box--label--拖入form1.ui
form1.cpp
cpp
QString sdata = this->readText("Hi");
this->label->setText(sdata);
chs.ts
cpp
<context>
<name>form1</name>
<message>
<source>Hi</source>
<translation>你好!</translation>
<chars>10</chars>
</message>
</context>
eng.ts
cpp
<context>
<name>form1</name>
<message>
<source>Hi</source>
<translation>Hello!</translation>
<chars>10</chars>
</message>
</context>