- Qt 6.8
- Qt 5 Core Compatibility APIs
- C++ Classes
- QTextCodec
- Qt 6.8.3 Reference Documentation

# Obsolete Members for QTextCodec

The following members of class QTextCodec are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

## Static Public Members

`(deprecated)` QTextCodec * | codecForTr()

## Member Function Documentation

### `[static, deprecated]` QTextCodec *QTextCodec::codecForTr()

This function is deprecated. We strongly advise against using it in new code.

Returns the codec used by QObject::tr() on its argument. If this function returns `nullptr` (the default), tr() assumes Latin-1.