Translations and context
I am trying to understand how Qt translation works.
I have an application that has a label placed on it.
The type of this label is derived from QLabel and provides a 'translate' method -
@class StatusLabel: public QLabel
StatusLabel(const QString & text, QWidget * parent = 0, Qt::WindowFlags f = 0);
void setStatus(const status s);
This is the implementation of the translate method
And is called from my main window -
However the string is translated
I think this has do with the context
In Linguist the strings are associated with the StatusLabel context and if I directly call the translator with this context I get the translated string.
Could someone explain when Qt changes the context when translating strings and why my original implementation does not work
Thanks very much
Did you enable translation in your application ?
Yes translations are enabled and working in my app