What was changed with QObject::tr(key) in QT6?
Solved
Qt 6
-
Can't say for sure, how it worked in QT5, but at least I was able to translate my strings with
QQuickItem::tr("<key>")
and it worked like
QCoreApplication::translate("<class name>", "<key>")
where <class name> is the name of my class derived from
QQuickItem
.but in QT6 it stopped working.
What was changed?
Probably in QT6 ?
Translation context with fully qualified class name with the namespace (as
p_object->metaObject()->className()
returns) does not help. -
I don't think anything changed. If so also lupdate would create a new entry. Please provide a minimal, compilable example.
-
@Christian-Ehrlicher Yes, nothing changes, but I moved my class to a namespace.