Unsolved When you change the text of a control several times.
-
I'm working on changing languages using a .qm file, and sometimes I have to change the text of a control several times. For example, there is an Add button, but if you change the radio button option, the Add button changes to Del.
In this case, how do I get the language when I work with the .qm file in multiple languages?
-
can you be a bit more clear on what you want to do/ what doesn't work ?
As long as your translation is ok, it doesn't matter to what text you set your Button
-
Sorry, it might be hard to understand because my English is weak.
Let me give you an example.QPushButton* pbtn = new QPushButton(tr("btnTest"));
Let's just say we've done a lot of multilingual work on pbtn with btnTest like this way.
By the way, Iif( bVisible )
{
pbtn->setText("Add");
}
else
{
pbtn->setText("Del");
}I want to know how to define and import Add, Del from a qm file.
-
@IknowQT said in When you change the text of a control several times.:
I want to know how to define and import Add, Del from a qm file.
According to the documentation with tr()