Qt 语言

The Qt API is implemented in C++, and provides additional features for easier cross-platform development. Qt supports QML, its own declarative language built on top of JavaScript, and Qt Quick, a framework built on top of QML. It is designed to describe a program's user interface: what it looks like and how it behaves. As an alternative to using C++, bindings to Qt exist for Python as Qt for Python .

C++

The Qt framework contains a comprehensive set of highly intuitive and modularized C++ library classes and is loaded with APIs to simplify your application development. Qt provides an intuitive C++ class library with a rich set of application build blocks for C++ development and adds the following features to C++:

QML

Qt Qml provides a framework for developing applications and libraries with the QML 语言 . It defines and implements the language and engine infrastructure, and provides an API to enable and extend the QML language with custom types and integrate QML code with JavaScript and C++. The Qt QML module provides both a QML API C++ API .

The Qt Qml module provides the language and infrastructure for QML applications. The Qt Quick 模块为构建用户界面提供了更多视觉组件、模型 视图支持、动画框架、等。

The QML language allows you to define trees of objects with a JSON-like syntax. It also allows you to implement logic in JavaScript.

用于 QML 应用程序的 JavaScript

JavaScript expressions allow QML code to contain application logic. Qt QML provides the framework for running JavaScript expressions in QML and from C++. It supports:

  • Quick development of both user-interfaces and application logic.
  • The JavaScript 主机环境 provided by QML that can run valid JavaScript, as specified in the 7th edition of the standard, as well as some extensions from later standards.
  • The dynamic creation of objects from within JavaScript. This is useful to delay instantiation of objects until necessary, thereby improving application startup time.

Qt for Python

Qt for Python offers the official Python bindings for Qt, which enables you to use Python to write your Qt applications. The project has the following components:

  • PySide6 : The official Python bindings for Qt 6
  • Shiboken6 : A binding generator tool, to expose C++ code to Python
  • Tooling : To make application development easier with PySide6
  • Shiboken 模块 : Provides utility functions for debugging