Reputation: 1069
I'm using visual studio + qt plugin for my project.
Created MyClass inherited from QAbstractTableModel.
That class is a part of a dll library.
I've overridden QAbstractTableModel::headerData, added tr("string") inside.
However tr did not work, no context was created and no name was added to the generated ts file.
Could anyone please help with that issue?
Upvotes: 2
Views: 626
Reputation: 1069
Found the solution.
Just forgot to add library which contains my class to ts lupdate / lrelease list.
Upvotes: 1
Reputation: 2081
try calling
QObject::tr("string")
or add
#include <QObject>
and call tr directly.
Upvotes: 1