QWidgetAction not giving correct translation context with tr()?
-
I have a series of classes derived from
QWidgetAction-- in each, I have calls totr()to set up the text of the menu items these actions represent.lupdatecorrectly extracts the strings and assigns the expected context to them. However, the calls totr()in the running code always return the untranslated string. Explicitly usingQApplication::translate()with the context set to the class name works, however. Is there something I need to do to aQWidgetActionto get it to set the classname fortr()during program execution? Or is there something else going on here? -
I have a series of classes derived from
QWidgetAction-- in each, I have calls totr()to set up the text of the menu items these actions represent.lupdatecorrectly extracts the strings and assigns the expected context to them. However, the calls totr()in the running code always return the untranslated string. Explicitly usingQApplication::translate()with the context set to the class name works, however. Is there something I need to do to aQWidgetActionto get it to set the classname fortr()during program execution? Or is there something else going on here?Please show a minimal, compilable example of your problem. tr() normally does the correct things when the context is correct.