Returns the given object (loader()->instance(name)) cast to type QTextCodecFactoryInterface* if the object (loader()->instance(name)) is of type QTextCodecFactoryInterface* (or of a subclass); otherwise returns 0. If object (loader()->instance(name)) is 0 then it will also return 0.
The class QTextCodecFactoryInterface must inherit (directly or indirectly) QObject and be declared with the Q_OBJECT macro.
The qobject_cast() function behaves similarly to the standard C++ dynamic_cast(), with the advantages that it doesn't require RTTI support and it works across dynamic library boundaries.