Qt Core C++ Classes

Provides core non-GUI functionality. More...

Reference

These are links to the API reference materials.

Namespaces

Qt

Contains miscellaneous identifiers used throughout the Qt library

Animation Framework

This page lists classes belonging to Qt Core's animation framework.

QAbstractAnimation

The base of all animations

QAnimationGroup

Abstract base class for groups of animations

QEasingCurve

Easing curves for controlling animation

QParallelAnimationGroup

Parallel group of animations

QPauseAnimation

Pause for QSequentialAnimationGroup

QPropertyAnimation

Animates Qt properties

QSequentialAnimationGroup

Sequential group of animations

QTimeLine

Timeline for controlling animations

QVariantAnimation

Abstract base class for animations

Threading Classes

These Qt Core classes provide threading support to applications. The Thread Support in Qt page covers how to use these classes.

Concurrent Filter and Filter-Reduce

 

Concurrent Map and Map-Reduce

 

Concurrent Run

 

QAtomicInteger

Platform-independent atomic operations on integers

QAtomicPointer

Template class that provides platform-independent atomic operations on pointers

QFuture

Represents the result of an asynchronous computation

QFutureSynchronizer

Convenience class that simplifies QFuture synchronization

QFutureWatcher

Allows monitoring a QFuture using signals and slots

QMutex

Access serialization between threads

QMutexLocker

Convenience class that simplifies locking and unlocking mutexes

QReadLocker

Convenience class that simplifies locking and unlocking read-write locks for read access

QReadWriteLock

Read-write locking

QRunnable

The base class for all runnable objects

QSemaphore

General counting semaphore

QThread

Platform-independent way to manage threads

QThreadPool

Manages a collection of QThreads

QThreadStorage

Per-thread data storage

QWaitCondition

Condition variable for synchronizing threads

QWriteLocker

Convenience class that simplifies locking and unlocking read-write locks for write access

QtConcurrent

High-level APIs that make it possible to write multi-threaded programs without using low-level threading primitives

The Container Classes

Qt provides the following sequential containers: QList, QLinkedList, QVector, QStack, and QQueue. For most applications, QList is the best type to use. Although it is implemented as an array-list, it provides very fast prepends and appends. If you really need a linked-list, use QLinkedList; if you want your items to occupy consecutive memory locations, use QVector. QStack and QQueue are convenience classes that provide LIFO and FIFO semantics.

Qt also provides these associative containers: QMap, QMultiMap, QHash, QMultiHash, and QSet. The "Multi" containers conveniently support multiple values associated with a single key. The "Hash" containers provide faster lookup by using a hash function instead of a binary search on a sorted set.

As special cases, the QCache and QContiguousCache classes provide efficient hash-lookup of objects in a limited cache storage.

Class Summary
QList<T> This is by far the most commonly used container class. It stores a list of values of a given type (T) that can be accessed by index. Internally, the QList is implemented using an array, ensuring that index-based access is very fast.

Items can be added at either end of the list using QList::append() and QList::prepend(), or they can be inserted in the middle using QList::insert(). More than any other container class, QList is highly optimized to expand to as little code as possible in the executable. QStringList inherits from QList<QString>.

QLinkedList<T> This is similar to QList, except that it uses iterators rather than integer indexes to access items. It also provides better performance than QList when inserting in the middle of a huge list, and it has nicer iterator semantics. (Iterators pointing to an item in a QLinkedList remain valid as long as the item exists, whereas iterators to a QList can become invalid after any insertion or removal.)
QVector<T> This stores an array of values of a given type at adjacent positions in memory. Inserting at the front or in the middle of a vector can be quite slow, because it can lead to large numbers of items having to be moved by one position in memory.
QStack<T> This is a convenience subclass of QVector that provides "last in, first out" (LIFO) semantics. It adds the following functions to those already present in QVector: push(), pop(), and top().
QQueue<T> This is a convenience subclass of QList that provides "first in, first out" (FIFO) semantics. It adds the following functions to those already present in QList: enqueue(), dequeue(), and head().
QSet<T> This provides a single-valued mathematical set with fast lookups.
QMap<Key, T> This provides a dictionary (associative array) that maps keys of type Key to values of type T. Normally each key is associated with a single value. QMap stores its data in Key order; if order doesn't matter QHash is a faster alternative.
QMultiMap<Key, T> This is a convenience subclass of QMap that provides a nice interface for multi-valued maps, i.e. maps where one key can be associated with multiple values.
QHash<Key, T> This has almost the same API as QMap, but provides significantly faster lookups. QHash stores its data in an arbitrary order.
QMultiHash<Key, T> This is a convenience subclass of QHash that provides a nice interface for multi-valued hashes.

Plugin Classes

These Qt Core classes deal with shared libraries, (for example, .so and DLL files), and with Qt plugins.

See the How to Create Qt Plugins page for more information.

Defining Plugins

The <QtPlugin> header file defines macros for defining plugins.

QAccessiblePlugin

Abstract base class for plugins provinding accessibility information for user interface elements

QGenericPlugin

Abstract base class for plugins

QGenericPluginFactory

Creates plugin drivers

QIconEnginePlugin

Abstract base for custom QIconEngine plugins

QImageIOPlugin

Defines an interface for writing an image format plugin

QLibrary

Loads shared libraries at runtime

QPluginLoader

Loads a plugin at run-time

QQmlExtensionPlugin

Abstract base for custom QML extension plugins

QScriptExtensionPlugin

Abstract base for custom QScript extension plugins

QSqlDriverPlugin

Abstract base for custom QSqlDriver plugins

QStylePlugin

Abstract base for custom QStyle plugins

Implicit Sharing

Warning: Be careful with copying an implicitly shared container (QMap, QVector, etc.) while you use STL-style iterator. See Implicit sharing iterator problem.

QBitArray

Array of bits

QBitmap

Monochrome (1-bit depth) pixmaps

QBrush

Defines the fill pattern of shapes drawn by QPainter

QByteArray

Array of bytes

QByteArrayList

List of byte arrays

QCache

Template class that provides a cache

QCollator

Compares strings according to a localized collation algorithm

QCollatorSortKey

Can be used to speed up string collation

QCommandLineOption

Defines a possible command-line option

QContiguousCache

Template class that provides a contiguous cache

QCursor

Mouse cursor with an arbitrary shape

QDBusPendingCall

Refers to one pending asynchronous call

QDBusUnixFileDescriptor

Holds one Unix file descriptor

QDateTime

Date and time functions

QDebug

Output stream for debugging information

QDir

Access to directory structures and their contents

QDnsDomainNameRecord

Stores information about a domain name record

QDnsHostAddressRecord

Stores information about a host address record

QDnsMailExchangeRecord

Stores information about a DNS MX record

QDnsServiceRecord

Stores information about a DNS SRV record

QDnsTextRecord

Stores information about a DNS TXT record

QFileInfo

System-independent file information

QFont

Specifies a font used for drawing text

QFontInfo

General information about fonts

QFontMetrics

Font metrics information

QFontMetricsF

Font metrics information

QGlyphRun

Direct access to the internal glyphs in a font

QGradient

Used in combination with QBrush to specify gradient fills

QHash

Template class that provides a hash-table-based dictionary

QHttpPart

Holds a body part to be used inside a HTTP multipart MIME message

QIcon

Scalable icons in different modes and states

QImage

Hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device

QKeySequence

Encapsulates a key sequence as used by shortcuts

QLinkedList

Template class that provides linked lists

QList

Template class that provides lists

QLocale

Converts between numbers and their string representations in various languages

QMap

Template class that provides a red-black-tree-based dictionary

QMimeType

Describes types of file or data, represented by a MIME type string

QMultiHash

Convenience QHash subclass that provides multi-valued hashes

QMultiMap

Convenience QMap subclass that provides multi-valued maps

QNetworkAddressEntry

Stores one IP address supported by a network interface, along with its associated netmask and broadcast address

QNetworkCacheMetaData

Cache information

QNetworkConfiguration

Abstraction of one or more access point configurations

QNetworkCookie

Holds one network cookie

QNetworkInterface

Listing of the host's IP addresses and network interfaces

QNetworkProxy

Network layer proxy

QNetworkProxyQuery

Used to query the proxy settings for a socket

QNetworkRequest

Holds a request to be sent with QNetworkAccessManager

QOpenGLDebugMessage

Wraps an OpenGL debug message

QPainterPath

Container for painting operations, enabling graphical shapes to be constructed and reused

QPalette

Contains color groups for each widget state

QPen

Defines how a QPainter should draw lines and outlines of shapes

QPersistentModelIndex

Used to locate data in a data model

QPicture

Paint device that records and replays QPainter commands

QPixmap

Off-screen image representation that can be used as a paint device

QPolygon

Vector of points using integer precision

QPolygonF

Vector of points using floating point precision

QProcessEnvironment

Holds the environment variables that can be passed to a program

QQueue

Generic container that provides a queue

QRawFont

Access to a single physical instance of a font

QRegExp

Pattern matching using regular expressions

QRegion

Specifies a clip region for a painter

QRegularExpression

Pattern matching using regular expressions

QRegularExpressionMatch

The results of a matching a QRegularExpression against a string

QRegularExpressionMatchIterator

Iterator on the results of a global match of a QRegularExpression object against a string

QSet

Template class that provides a hash-table-based set

QSqlField

Manipulates the fields in SQL database tables and views

QSqlQuery

Means of executing and manipulating SQL statements

QSqlRecord

Encapsulates a database record

QSslCertificate

Convenient API for an X509 certificate

QSslCertificateExtension

API for accessing the extensions of an X509 certificate

QSslCipher

Represents an SSL cryptographic cipher

QSslConfiguration

Holds the configuration and state of an SSL connection

QSslError

SSL error

QSslKey

Interface for private and public keys

QStack

Template class that provides a stack

QStaticText

Enables optimized drawing of text when the text and its layout is updated rarely

QStorageInfo

Provides information about currently mounted storage and drives

QString

Unicode character string

QStringList

List of strings

QTextBlockFormat

Formatting information for blocks of text in a QTextDocument

QTextBoundaryFinder

Way of finding Unicode text boundaries in a string

QTextCharFormat

Formatting information for characters in a QTextDocument

QTextCursor

Offers an API to access and modify QTextDocuments

QTextDocumentFragment

Represents a piece of formatted text from a QTextDocument

QTextFormat

Formatting information for a QTextDocument

QTextFrameFormat

Formatting information for frames in a QTextDocument

QTextImageFormat

Formatting information for images in a QTextDocument

QTextListFormat

Formatting information for lists in a QTextDocument

QTextTableCellFormat

Formatting information for table cells in a QTextDocument

QTextTableFormat

Formatting information for tables in a QTextDocument

QUrl

Convenient interface for working with URLs

QUrlQuery

Way to manipulate a key-value pairs in a URL's query

QVariant

Acts like a union for the most common Qt data types

QVector

Template class that provides a dynamic array

State Machine Classes

These Qt Core classes are part of the State Machine Framework.

QAbstractState

The base class of states of a QStateMachine

QAbstractTransition

The base class of transitions between QAbstractState objects

QEventTransition

QObject-specific transition for Qt events

QFinalState

Final state

QHistoryState

Means of returning to a previously active substate

QKeyEventTransition

Transition for key events

QMouseEventTransition

Transition for mouse events

QSignalTransition

Transition based on a Qt signal

QState

General-purpose state for QStateMachine

QStateMachine

Hierarchical finite state machine

QStateMachine::SignalEvent

Represents a Qt signal event

QStateMachine::WrappedEvent

Inherits QEvent and holds a clone of an event associated with a QObject

Input/Output and Networking

These Qt Core classes are used to handle input and output to and from external devices, processes, files etc. as well as manipulating files and directories.

QBuffer

QIODevice interface for a QByteArray

QDataStream

Serialization of binary data to a QIODevice

QDir

Access to directory structures and their contents

QFile

Interface for reading from and writing to files

QFileDevice

Interface for reading from and writing to open files

QFileInfo

System-independent file information

QFileSystemWatcher

Interface for monitoring files and directories for modifications

QIODevice

The base interface class of all I/O devices in Qt

QImageReader

Format independent interface for reading images from files or other devices

QImageWriter

Format independent interface for writing images to files or other devices

QProcess

Used to start external programs and to communicate with them

QProcessEnvironment

Holds the environment variables that can be passed to a program

QResource

Interface for reading directly from resources

QSaveFile

Interface for safely writing to files

QSettings

Persistent platform-independent application settings

QSocketNotifier

Support for monitoring activity on a file descriptor

QStorageInfo

Provides information about currently mounted storage and drives

QTemporaryDir

Creates a unique directory for temporary use

QTemporaryFile

I/O device that operates on temporary files

QTextDocumentWriter

Format-independent interface for writing a QTextDocument to files or other devices

QTextStream

Convenient interface for reading and writing text

QUrl

Convenient interface for working with URLs

QUrlQuery

Way to manipulate a key-value pairs in a URL's query

Event Classes

These Qt Core classes are used to create and handle events.

For more information see the Event System page.

QAbstractEventDispatcher

Interface to manage Qt's event queue

QActionEvent

Event that is generated when a QAction is added, removed, or changed

QBasicTimer

Timer events for objects

QChildEvent

Contains event parameters for child object events

QCloseEvent

Contains parameters that describe a close event

QContextMenuEvent

Contains parameters that describe a context menu event

QDragEnterEvent

Event which is sent to a widget when a drag and drop action enters it

QDragLeaveEvent

Event that is sent to a widget when a drag and drop action leaves it

QDragMoveEvent

Event which is sent while a drag and drop action is in progress

QDropEvent

Event which is sent when a drag and drop action is completed

QDynamicPropertyChangeEvent

Contains event parameters for dynamic property change events

QEnterEvent

Contains parameters that describe an enter event

QEvent

The base class of all event classes. Event objects contain event parameters

QExposeEvent

Contains event parameters for expose events

QFileOpenEvent

Event that will be sent when there is a request to open a file or a URL

QFocusEvent

Contains event parameters for widget focus events

QGestureEvent

The description of triggered gestures

QHelpEvent

Event that is used to request helpful information about a particular point in a widget

QHideEvent

Event which is sent after a widget is hidden

QHoverEvent

Contains parameters that describe a mouse event

QIconDragEvent

Indicates that a main icon drag has begun

QInputEvent

The base class for events that describe user input

QInputMethodEvent

Parameters for input method events

QKeyEvent

Describes a key event

QMouseEvent

Contains parameters that describe a mouse event

QMoveEvent

Contains event parameters for move events

QNativeGestureEvent

Contains parameters that describe a gesture event

QPaintEvent

Contains event parameters for paint events

QResizeEvent

Contains event parameters for resize events

QScrollEvent

Sent when scrolling

QScrollPrepareEvent

Sent in preparation of scrolling

QShortcut

Used to create keyboard shortcuts

QShortcutEvent

Event which is generated when the user presses a key combination

QShowEvent

Event that is sent when a widget is shown

QStatusTipEvent

Event that is used to show messages in a status bar

QTabletEvent

Contains parameters that describe a Tablet event

QTimer

Repetitive and single-shot timers

QTimerEvent

Contains parameters that describe a timer event

QTouchEvent

Contains parameters that describe a touch event

QWhatsThisClickedEvent

Event that can be used to handle hyperlinks in a "What's This?" text

QWheelEvent

Contains parameters that describe a wheel event

QWindowStateChangeEvent

The window state before a window state change

QtCore Module's Classes的更多相关文章

  1. QtGUI Module's Classes

    Qt GUI C++ Classes The Qt GUI module provides the basic enablers for graphical applications written ...

  2. QtWidgets Module's Classes

    Qt Widgets C++ Classes The Qt Widgets module extends Qt GUI with C++ widget functionality. More... A ...

  3. Python Sip [RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt5.QtCore module requires API v11.3]

    不知道原因,尝试卸载.编译安装均失败.只有这样曲线救国 import matplotlib matplotlib.use("WXAgg",warn=True) import mat ...

  4. niagara Workbench module import IntelliJ

    1. 在整个网络布线中使用一种布线方式,但是两端都有RJ-45 plug  的网络连线,无论是采用方式A还是方式B 端接的方式都是试用的.网络都是通用的,双绞线的顺序与RJ-45偶的引脚序号一一对应, ...

  5. qt 总结

    Qt中的每个类,都有一个对应的同名头文件,其中包含其类定义.例如要使用QApplication类,则需要在程序中添加" #include <QApplication>" ...

  6. qt5.9模块

    QAxContainer Module is a Windows-only extension for accessing ActiveX controls and COM objects 模块仅适用 ...

  7. Qt4与Qt3的主要不同

    Qt4与Qt3的主要不同 1)QT4 中提供了大量新控件,虽然它也保持了旧的控件,并命名为Qt3XXX,但是这样的控件没准在今后的哪个QT版本中就不被支持了,所以还是换吧,控件替换的 工作是巨大的,这 ...

  8. PyQt5 模块modules

    The QtCore module contains the core non-GUI functionality. This module is used for working with time ...

  9. Python的单元测试(二)

    title: Python的单元测试(二) date: 2015-03-04 19:08:20 categories: Python tags: [Python,单元测试] --- 在Python的单 ...

随机推荐

  1. 委托学习总结(二)匿名方法和lambda表达式

    之前总结了委托这个困惑着大多初学者的概念,继续来学习匿名方法和lambda表达式 (1)我们之前写了这样一段代码 //自定义一个委托 public delegate int Expression(in ...

  2. [翻译] DKTagCloudView - 标签云View

    DKTagCloudView 效果(支持点击view触发事件): Overview DKTagCloudView is a tag clouds view on iOS. It can generat ...

  3. Windows平台使用Gitblit搭建Git服务器教程

    Windows平台使用Gitblit搭建Git服务器图文教程 Git服务现在独树一帜,相比与SVN有更多的灵活性,最流行的开源项目托管网站Github上面,如果托管开源项目,那么就是免费使用的,但是闭 ...

  4. windows 下安装nodejs 要怎么设置环境变量

    windows 下安装nodejs 了,也安装了npm, 但是有时候切不能直接用request(‘ws’)这一类的东西.我觉得是确实环境变量或其他设置有问题,能否给个完整的设置方案: 要设置两个东西, ...

  5. Linux env命令详解

    env:查询环境变量 常用的命令展示 查看当前环境的环境变量 [root@localhost ~]# env HOSTNAME=localhost.localdomain SELINUX_ROLE_R ...

  6. 铁乐学Python_day10_函数2

    今天书接昨天的函数继续去学习了解: 昨天说到函数的动态参数. 1.函数的[动态参数] *args 动态参数,万能参数 args接受的就是实参对应的所有剩余的位置参数,并将其放在元组( )中. def ...

  7. 转贴:C语言链表基本操作

    http://www.oschina.net/code/snippet_252667_27314#comments 这个代码有很多错误,估计是从老谭书上抄来但是很多还抄错了:对照老谭的书好好研究下.切 ...

  8. php操作redis的两个个小脚本

    redis这东西,查询起来没有mysql那么方便,只能自己写脚本了.下面是工作中写的两个小脚本 第一个脚本,查找有lottery|的键,将他们全部删除|打印出来 <?php $redis = n ...

  9. java内存分配策略

    对象的内存分配,从大方向将就是在堆上分配,对象主要分配在新生代的Eden区上,如果启动了本地线程分配缓存,将按线程优先在TLAB上分配. 1. 对象优先在Eden区分配:大多数情况下,对象在新生代Ed ...

  10. 【转】[置顶] 在Android中显示GIF动画

    gif图动画在Android中还是比较常用的,比如像新浪微博中,有很多gif图片,而且展示非常好,所以我也想弄一个.经过我多方的搜索资料和整理,终于弄出来了,其实github上有很多开源的gif的展示 ...