Obsolete Members for QCoreApplication | Qt Core 5.6

Qt 5.6 | Qt Core | C++ Classes | QCoreApplication

Qt 5.6.2 Reference Documentation

# Obsolete Members for QCoreApplication

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

## Public Types

`(obsolete)` enum | Encoding { UnicodeUTF8 }

## Static Public Members

`(obsolete)` bool | hasPendingEvents()
`(obsolete)` QString | translate(const char *context, const char *key, const char *disambiguation, Encoding encoding, int n = -1)

- 1 static public member inherited from QObject

## Member Type Documentation

### enum QCoreApplication::Encoding

This enum type used to define the 8-bit encoding of character string arguments to translate(). This enum is now obsolete and UTF-8 will be used in all cases.

Constant | Value | Description
--- | --- | ---
`QCoreApplication::UnicodeUTF8` | `0` | UTF-8. UTF-8.

See also QObject::tr() and QString::fromUtf8().

## Member Function Documentation

### `[static]` bool QCoreApplication::hasPendingEvents()

This function returns `true` if there are pending events; otherwise returns `false`. Pending events can be either from the window system or posted events using postEvent().

Note: this function is not thread-safe. It may only be called in the main thread and only if there are no other threads running in the application (including threads Qt starts for its own purposes).

See also QAbstractEventDispatcher::hasPendingEvents().

### `[static]` QString QCoreApplication::translate(const char *context, const char *key, const char *disambiguation, Encoding encoding, int n = -1)