Qt Core

Getting Started

All other Qt modules rely on this module. To include the definitions of the module's classes, use the following directive:

#include <QtCore>

If you use qmake to build your projects, Qt Core is included by default.

Core Functionalities

Qt adds these features to C++:

  • a very powerful mechanism for seamless object communication called signals and slots
  • queryable and designable object properties
  • hierarchical and queryable object trees that organize
  • object ownership in a natural way with guarded pointers (QPointer)
  • a dynamic cast that works across library boundaries

The following pages provide more information about Qt's core features:

Threading and Concurrent Programming

Qt provides thread support in the form of platform-independent threading classes, a thread-safe way of posting events, and signal-slot connections across threads. Multithreaded programming is also a useful paradigm for performing time-consuming operations without freezing the user interface of an application.

The Thread Support in Qt page contains information on implementing threads in applications. Additional concurrent classes are provided by the Qt Concurrent module.

Input/Output, Resources, and Containers

Qt provides a resource system for organizing application files and assets, a set of containers, and classes for receiving input and printing output.

In addition, Qt Core provides a platform-independent mechanism for storing binary files in the application's executable.

Additional Frameworks

Qt Core also provides some of Qt's key frameworks.

Licenses and Attributions

Qt Core is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. Since Qt 5.4, these free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 2. See Qt Licensing for further details.

Executables on Windows potentially link against The qtmain Library. This library is available under commercial licenses and also under the BSD 3-clause "New" or "Revised" License.

Furthermore, Qt Core in Qt 5.12.3 may contain third party modules under following permissive licenses:

Data Compression Library (zlib), version 1.2.11

zlib License

Easing Equations by Robert Penner

BSD 3-clause "New" or "Revised" License

Efficient Binary-Decimal and Decimal-Binary Conversion Routines for IEEE Doubles, version 3.1.1

BSD 3-clause "New" or "Revised" License

FreeBSD strtoll and strtoull, version 18b29f3fb8abee5d57ed8f4a44f806bec7e0eeff

BSD 3-clause "New" or "Revised" License

MD4

Public Domain

MD5

Public Domain

PCRE2 - Stack-less Just-In-Time Compiler, version 10.32

BSD 2-clause "Simplified" License

PCRE2, version 10.32

BSD 3-clause "New" or "Revised" License

QEventDispatcher on macOS

BSD 3-clause "New" or "Revised" License

Secure Hash Algorithm SHA-1

Public Domain

Secure Hash Algorithm SHA-3 - Keccak, version 3.2

Creative Commons Zero v1.0 Universal

Secure Hash Algorithm SHA-3 - brg_endian, version https://github.com/BrianGladman/sha/ commit 4b9e13ead2c5b5e41ca27c65de4dd69ae0bac228

BSD 2-clause "Simplified" License

Secure Hash Algorithms SHA-384 and SHA-512

BSD 3-clause "New" or "Revised" License

Text Codec: EUC-JP

BSD 2-clause "Simplified" License

Text Codec: EUC-KR

BSD 2-clause "Simplified" License

Text Codec: GBK

BSD 2-clause "Simplified" License

Text Codec: ISO 2022-JP (JIS)

BSD 2-clause "Simplified" License

Text Codec: Shift-JIS

BSD 2-clause "Simplified" License

Text Codec: TSCII

BSD 2-clause "Simplified" License

Text Codecs: Big5, Big5-HKSCS

BSD 2-clause "Simplified" License

The Public Suffix List, version Generated on 2018-01-04

Mozilla Public License 2.0

TinyCBOR, version 0.6+patches

MIT License

Unicode Character Database (UCD), version 20

Unicode License Agreement - Data Files and Software (2016)

Unicode Common Locale Data Repository (CLDR), version v34

Unicode License Agreement - Data Files and Software (2016)

forkfd

MIT License

Reference

These are links to the API reference materials.

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.