I am working on translating our Qt gui at the moment.
I have the following code:
static const QString Foo;
const QString FooConstants::Foo = "foo";
editMenu->addAction(tr(FooConstants::Foo));
This does not seem to work.
That is, the specified constant is missing in the .ts file.
If I do this, it works:
editMenu->addAction(tr("foo"));
However, this constant is used in many places, and I do not want to manually update each string literal. (if this should change in the future)
Can anyone help?
source
share