Obsolete Members for QTextCodec | Qt 5 Core Compatibility APIs | Qt 6.11.2
Description: The QTextCodec class provides conversions between text encodings.

- Qt 6.11
- Qt 5 Core Compatibility APIs
- C++ Classes
- QTextCodec
- Qt 6.11.2 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.