Some dialog boxes do not get translated
Hi all,
Something strange is occurring in the latest releases of my project: when displaying the dialog boxes, some show up translated and some do not. There doesn't appear to be any logic. All the translations in the .ts files seem good - I've checked them in the text editor. There are no error messages during the lrelease command, nor at run time.
All classes inherit the Q_OBJECT macro.
The same behaviour occurs in linux and windows.
Any suggestions ???
Thanks,
Andre
Re: Some dialog boxes do not get translated
Do you talk about self generated dialogs or about the Qt standard dialogs? For the later you have to include also the Qt specific qm file beside yours.
Re: Some dialog boxes do not get translated
Not it's my personal classes which are not translated. I finally understood which get translated and which do not, but still havn't found the fix.
Those which get translated are the dialog instances declared as member variables of a class.
Those which do not are ths which are constructed on the heap
Code:
void MyClass::MyFunction()
{
}
Added after 5 minutes:
Not it's my personal classes which are not translated. I finally understood which get translated and which do not, but still havn't found the fix.
Those which get translated are the dialog instances declared as member variables of a class.
Code:
void MyClass::MyFunction()
{
m_dlg;//declared as a member variable
m_dlg.exec(); //shows up translated
}
Those which do not are ths which are constructed on the heap
Code:
void MyClass::MyFunction()
{
MyDialog dlg;
dlg.exec(); //shows up not translated
}
Any ideas ? Been stuck with this for several months now :mad: