Qt Core

开始使用

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 Core模块基于C++扩充的特性:

  • 一种非常强大的无缝对象通信机制-信号和槽
  • 支持查询和设计的对象属性
  • 支持查询的对象树结构
  • 提供受保护的指针 (QPointer), 以自然的方式拥有对象所有权
  • 跨库边界的动态转换

关于Qt Core模块更多信息, 参考下列页面:

线程和并行编程

Qt提供跨平台的 线程类, 线程安全的事件发布机制, 跨线程的信号,槽连接. 多线程编程是执行耗时操作, 并且使界面不卡顿的有效实践.

Thread Support in Qt p页面包含应用程序实现线程的信息. Qt Concurrent 模块提供其他并发类.

Input/Output, Resources, and Containers

Qt提供一个资源系统, 管理应用程序文件和其他资源, 一组容器及接收输入和打印输出的类.

除此之外, Qt Core还提供一种跨平台机制, 将二进制文件存储在应用程序的可执行文件.

Additional Frameworks

Qt Core也提供一些Qt的关键框架.

许可和归属

Qt Core可以从 The Qt Company获取商业许可. 此外, 它遵循免费软件许可协议. 从5.4开始, 免费软件许可协议包括 GNU Lesser General Public License, version 3, GNU General Public License, version 2. 详见 Qt Licensing.

windows系统的可执行程序可能链接 The qtmain Library. 这个库可获取商业许可, 也可遵循 BSD 3-clause "New" 或 "Revised" License.

此外, Qt Core模块包含三方库, 遵循下列协议:

Data Compression Library (zlib)

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

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

FreeBSD strtoll and strtoull

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

MD4

Public Domain

MD5

Public Domain

PCRE2

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

Parts of QTemporaryFile

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

Creative Commons Zero v1.0 Universal

Secure Hash Algorithm SHA-3 - brg_endian

BSD 3-clause "New" or "Revised" 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

Mozilla Public License 2.0

Unicode CLDR (Unicode Common Locale Data Repository)

Unicode Data Files and Software License

forkfd

MIT License

Reference

下列链接是API参考资料.