PDA

View Full Version : help on QObject::tr()



sincnarf
16th October 2007, 07:40
return tr("");

is my code.. and here's the error

'tr' was not declared in this scope

i've imported

#include <QString>
#include <QObject>

Isn't this enough?

nile.one
16th October 2007, 07:52
in non QObject-child classes you should use QObject::tr() instead of tr().

try


return QObject::tr("Hello");