qt核心机制摘录

Qt核心机制

Qt 5.6

Core Internals

Qt 5.6.0 Reference Documentation

Contents

Core Internals

Qt contains a rich set of fundamental enablers, mainly from the Qt Core module. Qt uses these enablers to provide higher-level UI and application development components. The following topics explain the most important enablers and show how to use them to implement specialized functionality not already provided by Qt.

Objects, Properties, and Events

The QObject class forms the foundation of Qt's object model and is the parent class of many Qt classes. The object model introduces many mechanisms such as a meta-object system which allows run-time introspection, manipulation, and invocation of properties and methods in the object. It also serves as the basis for Qt's event system, which is a low-level way of communicating between QObject-based objects. Another high-level form of communication is provided in Qt's signals and slots mechanism. These features can also be used in combination with the State Machine Framework which provides a formally defined and predictable way of managing the states of your application. In addition, QObject provides a simple timing mechanism with QObject::startTimer(). Alternatively, the QTimer class provides a high-level interface for timers.

Container Classes

A container is a data structure whose instances are collections of other objects. Some examples of containers are: dynamic arrays, queues, linked lists, and associative arrays. Qt provides a set of general purpose, template-based container classes for structuring data in memory.

See the full list of Container Classes for more details.

Internationalization

Qt uses Unicode for the encoding of displayable text strings. Unicode provides support for all commonly used writing systems in the world and is ideal for cross-platform development. Applications can also be written to support any number of different languages with one code base using Qt's powerful internationalization system.

Inter-Process Communication

Qt provides several classes to support communication between processes. You can also launch and manage external processes using the QProcess class.

Threading

Qt provides functionality to manage threads and parallelized code in a safe and platform-independent way.

Platform Support

Qt allows you to write platform-independent code, where the same code base can be compiled for and deployed on different platforms without any changes. In cases where you need to use platform-specific features and integrate with system libraries, Qt also provides solutions for this.

Qt integrates with the windowing system on the target platform using Qt Platform Abstraction (QPA). QPA is an abstraction of a windowing system which makes porting Qt to new platforms simple and quick. One such system is the Wayland protocol. Qt can be used together with Wayland as a light-weight windowing system on embedded hardware to support a multi-process graphical user interface.

The Qt Platform Abstraction uses Qt's plugin system. This plugin system provides APIs to extend Qt in specific areas (such as adding support for new image formats, database drivers, and so on) and also for writing your own extensible Qt applications which support third-party plugins.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值