|  | Home · All Classes · Modules

# QtCore Module

The QtCore module contains core non-GUI functionality. More...

### Types

- class QAbstractEventDispatcher
- class QAbstractFileEngine
- class QAbstractFileEngineHandler
- class QAbstractFileEngineIterator
- class QAbstractItemModel
- class QAbstractListModel
- class QAbstractTableModel
- class QBasicTimer
- class QBitArray
- class QBuffer
- class QByteArray
- class QByteArrayMatcher
- class QChar
- class QChildEvent
- class QCoreApplication
- class QCryptographicHash
- class QDataStream
- class QDate
- class QDateTime
- class QDir
- class QDirIterator
- class QDynamicPropertyChangeEvent
- class QEvent
- class QEventLoop
- class QFile
- class QFileInfo
- class QFileSystemWatcher
- class QFSFileEngine
- class QGenericArgument
- class QGenericReturnArgument
- class QIODevice
- class QLatin1Char
- class QLatin1String
- class QLibrary
- class QLibraryInfo
- class QLine
- class QLineF
- class QLocale
- class QMetaClassInfo
- class QMetaEnum
- class QMetaMethod
- class QMetaObject
- class QMetaProperty
- class QMetaType
- class QMimeData
- class QModelIndex
- class QMutex
- class QMutexLocker
- class QObject
- class QObjectCleanupHandler
- class QPersistentModelIndex
- class QPluginLoader
- class QPoint
- class QPointF
- class QProcess
- class QReadLocker
- class QReadWriteLock
- class QRect
- class QRectF
- class QRegExp
- class QResource
- class QRunnable
- class QSemaphore
- class QSettings
- class QSharedMemory
- class QSignalMapper
- class QSize
- class QSizeF
- class QSocketNotifier
- class QString
- class QStringList
- class QStringMatcher
- class QStringRef
- class QSysInfo
- class QSystemLocale
- class QSystemSemaphore
- class Qt
- class QTemporaryFile
- class QTextBoundaryFinder
- class QTextCodec
- class QTextDecoder
- class QTextEncoder
- class QTextStream
- class QThread
- class QThreadPool
- class QTime
- class QTimeLine
- class QTimer
- class QTimerEvent
- enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg }
- class QTranslator
- class QUrl
- class QUuid
- class QVariant
- class QWaitCondition
- class QWriteLocker
- class QXmlStreamAttribute
- class QXmlStreamAttributes
- class QXmlStreamEntityDeclaration
- class QXmlStreamEntityResolver
- class QXmlStreamNamespaceDeclaration
- class QXmlStreamNotationDeclaration
- class QXmlStreamReader
- class QXmlStreamWriter

### Module Functions

- QTextStream bin (QTextStream s)
- QTextStream bom (QTextStream s)
- QTextStream center (QTextStream s)
- QTextStream dec (QTextStream s)
- QTextStream endl (QTextStream s)
- QTextStream fixed (QTextStream s)
- QTextStream flush (QTextStream s)
- QTextStream forcepoint (QTextStream s)
- QTextStream forcesign (QTextStream s)
- QTextStream hex (QTextStream s)
- QTextStream left (QTextStream s)
- QTextStream lowercasebase (QTextStream s)
- QTextStream lowercasedigits (QTextStream s)
- QTextStream noforcepoint (QTextStream s)
- QTextStream noforcesign (QTextStream s)
- QTextStream noshowbase (QTextStream s)
- QTextStream oct (QTextStream s)
- pyqtRemoveInputHook ()
- pyqtRestoreInputHook ()
- object pyqtSignature (str signature, str result = None)
- object Q_ARG (str type, object data)
- object Q_ENUMS (...)
- object Q_FLAGS (...)
- object Q_RETURN_ARG (str type)
- float qAbs (float t)
- qAddPostRoutine (callable)
- unsigned long qChecksum (str s)
- QByteArray qCompress (QByteArray data, int compressionLevel = -1)
- qCritical (str)
- qDebug (str)
- qErrnoWarning (int code, str msg)
- qErrnoWarning (str msg)
- qFatal (str)
- bool qFuzzyCompare (float p1, float p2)
- float qInf ()
- callable qInstallMsgHandler (callable)
- bool qIsFinite (float d)
- bool qIsInf (float d)
- bool qIsNaN (float d)
- bool qIsNull (float d)
- float qQNaN ()
- int qrand ()
- bool qRegisterResourceData (int, str, str, str)
- qRemovePostRoutine (callable)
- int qRound (float d)
- long qRound64 (float d)
- QTextStreamManipulator qSetFieldWidth (int width)
- QTextStreamManipulator qSetPadChar (QChar ch)
- QTextStreamManipulator qSetRealNumberPrecision (int precision)
- bool qSharedBuild ()
- float qSNaN ()
- qsrand (unsigned long seed)
- int qstrcmp (str str1, str str2)
- str qstrcpy (str dst, str src)
- str qstrdup (str)
- int qstricmp (str, str)
- unsigned long qstrlen (str str)
- int qstrncmp (str str1, str str2, unsigned long len)
- str qstrncpy (str dst, str src, unsigned long len)
- int qstrnicmp (str, str, unsigned long len)
- unsigned long qstrnlen (str str, unsigned long maxlen)
- qSwap (QBitArray value1, QBitArray value2)
- qSwap (QByteArray value1, QByteArray value2)
- qSwap (QString value1, QString value2)
- qSwap (QUrl value1, QUrl value2)
- qSwap (QVariant value1, QVariant value2)
- object QT_TR_NOOP (object)
- object QT_TRANSLATE_NOOP (object, object)
- QByteArray qUncompress (QByteArray data)
- bool qUnregisterResourceData (int, str, str, str)
- str qVersion ()
- qWarning (str)
- QTextStream reset (QTextStream s)
- QTextStream right (QTextStream s)
- QTextStream scientific (QTextStream s)
- QTextStream showbase (QTextStream s)
- object SIGNAL (str)
- object SLOT (str)
- QTextStream uppercasebase (QTextStream s)
- QTextStream uppercasedigits (QTextStream s)
- QTextStream ws (QTextStream s)

### Module Members

- int PYQT_VERSION
- str PYQT_VERSION_STR
- int QT_VERSION
- str QT_VERSION_STR

## Detailed Description

The QtCore module contains non-GUI functionality.

All other PyQt modules rely on this module. To import the module use, for example, the following statement:

    from PyQt4 import QtCore

## Type Documentation

### QtMsgType

This enum describes the messages that can be sent to a message handler (QtMsgHandler). You can use the enum to identify and associate the various message types with the appropriate actions.

Constant | Value | Description
--- | --- | ---
`QtDebugMsg` | `0` | A message generated by the qDebug() function.
`QtWarningMsg` | `1` | A message generated by the qWarning() function.
`QtCriticalMsg` | `2` | A message generated by the qCritical() function.
`QtFatalMsg` | `3` | A message generated by the qFatal() function.
`QtSystemMsg` | `QtCriticalMsg` |

See also QtMsgHandler and qInstallMsgHandler().

## Function Documentation

### QTextStream bin (QTextStream s)

Calls QTextStream.setIntegerBase(2) on stream and returns stream.

See also oct(), dec(), hex(), and QTextStream manipulators.

### QTextStream bom (QTextStream s)

Toggles insertion of the UTF-16 Byte Order Mark on stream when QTextStream is used with a UTF-16 codec.

See also QTextStream.setGenerateByteOrderMark() and QTextStream manipulators.

### QTextStream center (QTextStream s)

Calls QTextStream.setFieldAlignment(QTextStream.AlignCenter) on stream and returns stream.

See also left(), right(), and QTextStream manipulators.

### QTextStream dec (QTextStream s)

Calls QTextStream.setIntegerBase(10) on stream and returns stream.

See also bin(), oct(), hex(), and QTextStream manipulators.

### QTextStream endl (QTextStream s)

Writes '\n' to the stream and flushes the stream.

Equivalent to

     stream << '\n' << flush;

Note: On Windows, all '\n' characters are written as '\r\n' if QTextStream's device or string is opened using the QIODevice.Text flag.

See also flush(), reset(), and QTextStream manipulators.

### QTextStream fixed (QTextStream s)

Calls QTextStream.setRealNumberNotation(QTextStream.FixedNotation) on stream and returns stream.

See also scientific() and QTextStream manipulators.

### QTextStream flush (QTextStream s)

Flushes any buffered data waiting to be written to the device.

If QTextStream operates on a string, this function does nothing.

### QTextStream forcepoint (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() | QTextStream.ForcePoint) on stream and returns stream.

See also noforcepoint(), forcesign(), showbase(), and QTextStream manipulators.

### QTextStream forcesign (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() | QTextStream.ForceSign) on stream and returns stream.

See also noforcesign(), forcepoint(), showbase(), and QTextStream manipulators.

### QTextStream hex (QTextStream s)

Calls QTextStream.setIntegerBase(16) on stream and returns stream.

Note: The hex modifier can only be used for writing to streams.

See also bin(), oct(), dec(), and QTextStream manipulators.

### QTextStream left (QTextStream s)

Calls QTextStream.setFieldAlignment(QTextStream.AlignLeft) on stream and returns stream.

See also right(), center(), and QTextStream manipulators.

### QTextStream lowercasebase (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() & ~QTextStream.UppercaseBase) on stream and returns stream.

See also uppercasebase(), lowercasedigits(), and QTextStream manipulators.

### QTextStream lowercasedigits (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() & ~QTextStream.UppercaseDigits) on stream and returns stream.

See also uppercasedigits(), lowercasebase(), and QTextStream manipulators.

### QTextStream noforcepoint (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() & ~QTextStream.ForcePoint) on stream and returns stream.

See also forcepoint(), noforcesign(), noshowbase(), and QTextStream manipulators.

### QTextStream noforcesign (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() & ~QTextStream.ForceSign) on stream and returns stream.

See also forcesign(), noforcepoint(), noshowbase(), and QTextStream manipulators.

### QTextStream noshowbase (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() & ~QTextStream.ShowBase) on stream and returns stream.

See also showbase(), noforcesign(), noforcepoint(), and QTextStream manipulators.

### QTextStream oct (QTextStream s)

Calls QTextStream.setIntegerBase(8) on stream and returns stream.

See also bin(), dec(), hex(), and QTextStream manipulators.

### pyqtRemoveInputHook ()

When the QtCore module is imported for the first time it installs a Python input hook (ie. it sets the value of Python's PyOS_InputHook variable). This allows commands to be entered at the interpreter prompt while the application is running. It is then possible to dynamically create new Qt objects and call the methods of any existing Qt object.

The input hook can cause problems for certain types of application, particularly those that provide a similar facility through different means. This function removes the input hook installed by PyQt.

The input hook can be restored using the pyqtRestoreInputHook() function.

### pyqtRestoreInputHook ()

When the QtCore module is imported for the first time it installs a Python input hook (ie. it sets the value of Python's PyOS_InputHook variable). This allows commands to be entered at the interpreter prompt while the application is running. It is then possible to dynamically create new Qt objects and call the methods of any existing Qt object.

The input hook can cause problems for certain types of application, particularly those that provide a similar facility through different means, and so the pyqtRemoveInputHook() function is provided to remove it.

This function will restore the input hook if it has been removed.

### object pyqtSignature (str signature, str result = None)

### object Q_ARG (str type, object data)

### object Q_ENUMS (...)

### object Q_FLAGS (...)

### object Q_RETURN_ARG (str type)

### float qAbs (float t)

Returns the absolute value of value. For example:

     int absoluteValue;
     int myValue = -4;

     absoluteValue = qAbs(myValue);
     // absoluteValue == 4

### qAddPostRoutine (callable)

### unsigned long qChecksum (str s)

Returns the CRC-16 checksum of the first len bytes of data.

The checksum is independent of the byte order (endianness).

Note: This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.

### QByteArray qCompress (QByteArray data, int compressionLevel = -1)

Compresses the data byte array and returns the compressed data in a new byte array.

The compressionLevel parameter specifies how much compression should be used. Valid values are between 0 and 9, with 9 corresponding to the greatest compression (i.e. smaller compressed data) at the cost of using a slower algorithm. Smaller values (8, 7, ..., 1) provide successively less compression at slightly faster speeds. The value 0 corresponds to no compression at all. The default value is -1, which specifies zlib's default compression.

See also qUncompress().

### qCritical (str)

Calls the message handler with the critical message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger.

This function takes a format string and a list of arguments, similar to the C printf() function.

Example:

     void load(const QString &fileName)
     {
         QFile file(fileName);
         if (!file.exists())
             qCritical("File '%s' does not exist!", qPrintable(fileName));
     }

If you include <QtDebug>, a more convenient syntax is also available:

     qCritical() << "Brush:" << myQBrush << "Other
     value:" << i;

A space is inserted between the items, and a newline is appended at the end.

Warning: The internal buffer is limited to 8192 bytes, including the '\0'-terminator.

See also qDebug(), qWarning(), qFatal(), qInstallMsgHandler(), and Debugging Techniques.

### qDebug (str)

Calls the message handler with the debug message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the console, if it is a console application; otherwise, it is sent to the debugger. This function does nothing if `QT_NO_DEBUG_OUTPUT` was defined during compilation.

If you pass the function a format string and a list of arguments, it works in similar way to the C printf() function.

Example:

     qDebug("Items in list: %d", myList.size());

If you include `<QtDebug>`, a more convenient syntax is also available:

     qDebug() << "Brush:" << myQBrush << "Other value:" << i;

This syntax automatically puts a single space between each item, and outputs a newline at the end. It supports many C++ and Qt types.

Warning: The internal buffer is limited to 8192 bytes, including the '\0'-terminator.

See also qWarning(), qCritical(), qFatal(), qInstallMsgHandler(), and Debugging Techniques.

### qErrnoWarning (int code, str msg)

### qErrnoWarning (str msg)

### qFatal (str)

Calls the message handler with the fatal message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger.

If you are using the default message handler this function will abort on Unix systems to create a core dump. On Windows, for debug builds, this function will report a _CRT_ERROR enabling you to connect a debugger to the application.

This function takes a format string and a list of arguments, similar to the C printf() function.

Example:

     int divide(int a, int b)
     {
         if (b == 0)                                // program error
             qFatal("divide: cannot divide by zero");
         return a / b;
     }

Warning: The internal buffer is limited to 8192 bytes, including the '\0'-terminator.

See also qDebug(), qCritical(), qWarning(), qInstallMsgHandler(), and Debugging Techniques.

### bool qFuzzyCompare (float p1, float p2)

Compares the floating point value p1 and p2 and returns `true` if they are considered equal, otherwise `false`.

The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.

Note: This function is thread-safe.

This function was introduced in Qt 4.4.

### float qInf ()

### callable qInstallMsgHandler (callable)

The callable argument may also be None.

Installs a Qt message handler which has been defined previously. Returns a pointer to the previous message handler (which may be 0).

The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug version) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. If you implement your own message handler, you get total control of these messages.

The default message handler prints the message to the standard output under X11 or to the debugger under Windows. If it is a fatal message, the application aborts immediately.

Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output.

To restore the message handler, call `qInstallMsgHandler(0)`.

Example:

     #include <qapplication.h>
     #include <stdio.h>
     #include <stdlib.h>

     void myMessageOutput(QtMsgType type, const char *msg)
     {
         switch (type) {
         case QtDebugMsg:
             fprintf(stderr, "Debug: %s\n", msg);
             break;
         case QtWarningMsg:
             fprintf(stderr, "Warning: %s\n", msg);
             break;
         case QtCriticalMsg:
             fprintf(stderr, "Critical: %s\n", msg);
             break;
         case QtFatalMsg:
             fprintf(stderr, "Fatal: %s\n", msg);
             abort();
         }
     }

     int main(int argc, char **argv)
     {
         qInstallMsgHandler(myMessageOutput);
         QApplication app(argc, argv);
         ...
         return app.exec();
     }

See also qDebug(), qWarning(), qCritical(), qFatal(), QtMsgType, and Debugging Techniques.

### bool qIsFinite (float d)

### bool qIsInf (float d)

### bool qIsNaN (float d)

### bool qIsNull (float d)

### float qQNaN ()

### int qrand ()

Thread-safe version of the standard C++ `rand()` function.

Returns a value between 0 and `RAND_MAX` (defined in `<cstdlib>` and `<stdlib.h>`), the next number in the current sequence of pseudo-random integers.

Use `qsrand()` to initialize the pseudo-random number generator with a seed value.

This function was introduced in Qt 4.2.

See also qsrand().

### bool qRegisterResourceData (int, str, str, str)

### qRemovePostRoutine (callable)

### int qRound (float d)

Rounds value to the nearest integer. For example:

     qreal valueA = 2.3;
     qreal valueB = 2.7;

     int roundedValueA = qRound(valueA);
     // roundedValueA = 2
     int roundedValueB = qRound(valueB);
     // roundedValueB = 3

### long qRound64 (float d)

Rounds value to the nearest 64-bit integer. For example:

     qreal valueA = 42949672960.3;
     qreal valueB = 42949672960.7;

     int roundedValueA = qRound(valueA);
     // roundedValueA = 42949672960
     int roundedValueB = qRound(valueB);
     // roundedValueB = 42949672961

### QTextStreamManipulator qSetFieldWidth (int width)

Equivalent to QTextStream.setFieldWidth(width).

### QTextStreamManipulator qSetPadChar (QChar ch)

Equivalent to QTextStream.setPadChar(ch).

### QTextStreamManipulator qSetRealNumberPrecision (int precision)

Equivalent to QTextStream.setRealNumberPrecision(precision).

### bool qSharedBuild ()

### float qSNaN ()

### qsrand (unsigned long seed)

Thread-safe version of the standard C++ `srand()` function.

Sets the argument seed to be used to generate a new random number sequence of pseudo random integers to be returned by qrand().

If no seed value is provided, qrand() is automatically seeded with a value of 1.

The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently calls qrand(), the threads will get the same random number sequence.

This function was introduced in Qt 4.2.

See also qrand().

### int qstrcmp (str str1, str str2)

A safe `strcmp()` function.

Compares str1 and str2. Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.

Special case 1: Returns 0 if str1 and str2 are both 0.

Special case 2: Returns an arbitrary non-zero value if str1 is 0 or str2 is 0 (but not both).

See also qstrncmp(), qstricmp(), qstrnicmp(), and 8-bit Character Comparisons.

### str qstrcpy (str dst, str src)

Copies all the characters up to and including the '\0' from src into dst and returns a pointer to dst. If src is 0, it immediately returns 0.

This function assumes that dst is large enough to hold the contents of src.

See also qstrncpy().

### str qstrdup (str)

Returns a duplicate string.

Allocates space for a copy of src, copies it, and returns a pointer to the copy. If src is 0, it immediately returns 0.

Ownership is passed to the caller, so the returned string must be deleted using `delete[]`.

### int qstricmp (str, str)

A safe `stricmp()` function.

Compares str1 and str2 ignoring the case of the characters. The encoding of the strings is assumed to be Latin-1.

Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.

Special case 1: Returns 0 if str1 and str2 are both 0.

Special case 2: Returns a random non-zero value if str1 is 0 or str2 is 0 (but not both).

See also qstrcmp(), qstrncmp(), qstrnicmp(), and 8-bit Character Comparisons.

### unsigned long qstrlen (str str)

A safe `strlen()` function.

Returns the number of characters that precede the terminating '\0', or 0 if str is 0.

See also qstrnlen().

### int qstrncmp (str str1, str str2, unsigned long len)

A safe `strncmp()` function.

Compares at most len bytes of str1 and str2.

Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.

Special case 1: Returns 0 if str1 and str2 are both 0.

Special case 2: Returns a random non-zero value if str1 is 0 or str2 is 0 (but not both).

See also qstrcmp(), qstricmp(), qstrnicmp(), and 8-bit Character Comparisons.

### str qstrncpy (str dst, str src, unsigned long len)

A safe `strncpy()` function.

Copies at most len bytes from src (stopping at len or the terminating '\0' whichever comes first) into dst and returns a pointer to dst. Guarantees that dst is '\0'-terminated. If src or dst is 0, returns 0 immediately.

This function assumes that dst is at least len characters long.

See also qstrcpy().

### int qstrnicmp (str, str, unsigned long len)

A safe `strnicmp()` function.

Compares at most len bytes of str1 and str2 ignoring the case of the characters. The encoding of the strings is assumed to be Latin-1.

Returns a negative value if str1 is less than str2, 0 if str1 is equal to str2 or a positive value if str1 is greater than str2.

Special case 1: Returns 0 if str1 and str2 are both 0.

Special case 2: Returns a random non-zero value if str1 is 0 or str2 is 0 (but not both).

See also qstrcmp(), qstrncmp(), qstricmp(), and 8-bit Character Comparisons.

### unsigned long qstrnlen (str str, unsigned long maxlen)

### qSwap (QBitArray value1, QBitArray value2)

### qSwap (QByteArray value1, QByteArray value2)

### qSwap (QString value1, QString value2)

### qSwap (QUrl value1, QUrl value2)

### qSwap (QVariant value1, QVariant value2)

### object QT_TR_NOOP (object)

Marks the string literal sourceText for dynamic translation in the current context (class), i.e the stored sourceText will not be altered.

The macro expands to sourceText.

Example:

     QString FriendlyConversation.greeting(int type)
     {
     static const char *greeting_strings[] = {
         QT_TR_NOOP("Hello"),
         QT_TR_NOOP("Goodbye")
     };
     return tr(greeting_strings[type]);
     }

See also QT_TRANSLATE_NOOP() and Internationalization with Qt.

### object QT_TRANSLATE_NOOP (object, object)

Marks the string literal sourceText for dynamic translation in the given context, i.e the stored sourceText will not be altered. The context is typically a class and also needs to be specified as string literal.

The macro expands to sourceText.

Example:

     static const char *greeting_strings[] = {
         QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
         QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
     };

     QString FriendlyConversation.greeting(int type)
     {
         return tr(greeting_strings[type]);
     }

     QString global_greeting(int type)
     {
         return qApp->translate("FriendlyConversation",
                greeting_strings[type]);
     }

See also QT_TR_NOOP(), QT_TRANSLATE_NOOP3(), and Internationalization with Qt.

### QByteArray qUncompress (QByteArray data)

Uncompresses the data byte array and returns a new byte array with the uncompressed data.

Returns an empty QByteArray if the input data was corrupt.

This function will uncompress data compressed with qCompress() from this and any earlier Qt version, back to Qt 3.1 when this feature was added.

Note: If you want to use this function to uncompress external data compressed using zlib, you first need to prepend four bytes to the byte array that contain the expected length of the uncompressed data encoded in big-endian order (most significant byte first).

See also qCompress().

### bool qUnregisterResourceData (int, str, str, str)

### str qVersion ()

Returns the version number of Qt at run-time as a string (for example, "4.1.2"). This may be a different version than the version the application was compiled against.

See also QT_VERSION_STR.

### qWarning (str)

Calls the message handler with the warning message msg. If no message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. This function does nothing if `QT_NO_WARNING_OUTPUT` was defined during compilation; it exits if the environment variable `QT_FATAL_WARNINGS` is defined.

This function takes a format string and a list of arguments, similar to the C printf() function.

Example:

     void f(int c)
     {
         if (c > 200)
             qWarning("f: bad argument, c == %d", c);
     }

If you include <QtDebug>, a more convenient syntax is also available:

     qWarning() << "Brush:" << myQBrush << "Other value:"
     << i;

This syntax inserts a space between each item, and appends a newline at the end.

Warning: The internal buffer is limited to 8192 bytes, including the '\0'-terminator.

See also qDebug(), qCritical(), qFatal(), qInstallMsgHandler(), and Debugging Techniques.

### QTextStream reset (QTextStream s)

Resets QTextStream's formatting options, bringing it back to its original constructed state. The device, string and any buffered data is left untouched.

### QTextStream right (QTextStream s)

Calls QTextStream.setFieldAlignment(QTextStream.AlignRight) on stream and returns stream.

See also left(), center(), and QTextStream manipulators.

### QTextStream scientific (QTextStream s)

Calls QTextStream.setRealNumberNotation(QTextStream.ScientificNotation) on stream and returns stream.

See also fixed() and QTextStream manipulators.

### QTextStream showbase (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() | QTextStream.ShowBase) on stream and returns stream.

See also noshowbase(), forcesign(), forcepoint(), and QTextStream manipulators.

### object SIGNAL (str)

### object SLOT (str)

### QTextStream uppercasebase (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() | QTextStream.UppercaseBase) on stream and returns stream.

See also lowercasebase(), uppercasedigits(), and QTextStream manipulators.

### QTextStream uppercasedigits (QTextStream s)

Calls QTextStream.setNumberFlags(QTextStream.numberFlags() | QTextStream.UppercaseDigits) on stream and returns stream.

See also lowercasedigits(), uppercasebase(), and QTextStream manipulators.

### QTextStream ws (QTextStream s)

Calls skipWhiteSpace() on stream and returns stream.

See also QTextStream manipulators.

## Member Documentation

### int PYQT_VERSION

This member should be treated as a constant.

### str PYQT_VERSION_STR

This member should be treated as a constant.

### int QT_VERSION

This member should be treated as a constant.

### str QT_VERSION_STR

This member should be treated as a constant.