|  | Home · All Classes · Modules

# QtCore Module

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

### Types

- class MSG
- class POINT
- class QAbstractAnimation
- class QAbstractEventDispatcher
- class QAbstractFileEngine
- class QAbstractFileEngineHandler
- class QAbstractFileEngineIterator
- class QAbstractItemModel
- class QAbstractListModel
- class QAbstractState
- class QAbstractTableModel
- class QAbstractTransition
- class QAnimationGroup
- 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 QEasingCurve
- class QElapsedTimer
- class QEvent
- class QEventLoop
- class QEventTransition
- class QFile
- class QFileInfo
- class QFileSystemWatcher
- class QFinalState
- class QFSFileEngine
- class QGenericArgument
- class QGenericReturnArgument
- class QHistoryState
- class QIODevice
- class QLatin1Char
- class QLatin1String
- class QLibrary
- class QLibraryInfo
- class QLine
- class QLineF
- class QLocale
- class QMargins
- 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 QParallelAnimationGroup
- class QPauseAnimation
- class QPersistentModelIndex
- class QPluginLoader
- class QPoint
- class QPointF
- class QProcess
- class QProcessEnvironment
- class QPropertyAnimation
- class QPyNullVariant
- class QReadLocker
- class QReadWriteLock
- class QRect
- class QRectF
- class QRegExp
- class QResource
- class QRunnable
- class QSemaphore
- class QSequentialAnimationGroup
- class QSettings
- class QSharedMemory
- class QSignalMapper
- class QSignalTransition
- class QSize
- class QSizeF
- class QSocketNotifier
- class QState
- class QStateMachine
- 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 QVariantAnimation
- class QWaitCondition
- class QWriteLocker
- class QXmlStreamAttribute
- class QXmlStreamAttributes
- class QXmlStreamEntityDeclaration
- class QXmlStreamEntityResolver
- class QXmlStreamNamespaceDeclaration
- class QXmlStreamNotationDeclaration
- class QXmlStreamReader
- class QXmlStreamWriter
- enum Type { Invalid, Bool, Int, UInt, ..., UserType }

### Module Functions

- QTextStream bin (QTextStream s)
- 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 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)
- QTextStream oct_ (QTextStream s)
- pyqtRemoveInputHook ()
- pyqtRestoreInputHook ()
- object pyqtSignature (str signature, str result = None)
- object pyqtSlot (str signature, str name = None, str result = None)
- QGenericArgument Q_ARG (object type, object data)
- Q_ENUMS (...)
- Q_FLAGS (...)
- QGenericReturnArgument Q_RETURN_ARG (object type)
- float qAbs (float t)
- qAddPostRoutine (callable)
- int 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)
- int qRound64 (float d)
- QTextStreamManipulator qSetFieldWidth (int width)
- QTextStreamManipulator qSetPadChar (QChar ch)
- QTextStreamManipulator qSetRealNumberPrecision (int precision)
- bool qSharedBuild ()
- float qSNaN ()
- qsrand (int seed)
- 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)
- str QT_TR_NOOP (str)
- str QT_TR_NOOP_UTF8 (str)
- str QT_TRANSLATE_NOOP (str, str)
- 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)
- str SIGNAL (str)
- str 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

### Type

## Function Documentation

### QTextStream bin (QTextStream s)

### 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)

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)

### QTextStream forcesign (QTextStream s)

### QTextStream hex (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)

### QTextStream oct_ (QTextStream s)

### 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 pyqtSlot (str signature, str name = None, str result = None)

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

### Q_ENUMS (...)

### Q_FLAGS (...)

### QGenericReturnArgument Q_RETURN_ARG (object type)

### float qAbs (float t)

### qAddPostRoutine (callable)

### int 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)

The callable argument may also be None.

### 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)

### int qRound64 (float d)

### QTextStreamManipulator qSetFieldWidth (int width)

### QTextStreamManipulator qSetPadChar (QChar ch)

### QTextStreamManipulator qSetRealNumberPrecision (int precision)

### bool qSharedBuild ()

### float qSNaN ()

### qsrand (int seed)

### 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)

### str QT_TR_NOOP (str)

### str QT_TR_NOOP_UTF8 (str)

### str QT_TRANSLATE_NOOP (str, str)

### QByteArray qUncompress (QByteArray data)

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

### str qVersion ()

### qWarning (str)

### 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)

### QTextStream scientific (QTextStream s)

### QTextStream showbase (QTextStream s)

### str SIGNAL (str)

### str SLOT (str)

### QTextStream uppercasebase (QTextStream s)

### QTextStream uppercasedigits (QTextStream s)

### QTextStream ws (QTextStream s)

## 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.