PDA

View Full Version : QtLinguist can not translate the title of QDockWidget



hakiim35
2nd July 2010, 14:46
Hi, I am using QtLinguist for language translation in my application. I have several QDockWidget's and I am initializing their constructors with the title set as follows:

header:

View::View(const QString &colorName,const QString &nme, QWidget *parent, Qt::WindowFlags flags)
: QDockWidget(parent, flags),name(nme)

cpp:

MyView::MyView(QWidget *parent)
: View("Gray",tr("FVIEW_NME_FILES"), parent, Qt::WindowFlags(Qt::RightDockWidgetArea))

I edit the corresponding translations in the .ts file and save the result but Qt Linguist can not translate them properly. Instead of the translated string, the tag FVIEW_NME_FILES is shown in runtime.
What can be the problem here?
Thanks in advance.