开发工具

Qt 是为一次性开发应用程序和用户界面,并将它们部署到多个桌面和移动操作系统中而设计的。

采用 Qt 开始应用程序开发的最简单方式是 download and install Qt 5. It contains Qt libraries, examples, documentation, and the necessary development tools, such as the Qt Creator IDE (集成开发环境)。

Qt Creator 为您提供在整个应用程序开发生命周期内完成任务的工具,从创建工程到在目标平台部署应用程序。Qt Creator 通过提供向导逐步指导您完成工程创建过程、创建必要文件、并根据所做选择指定设置,自动化处理某些任务 (譬如:创建工程)。此外,它通过提供语义高亮、校验代码句法、代码补全、重构动作及其它有用特征,加速某些任务 (譬如:编写代码)。

下列 Qt 工具已集成到 Qt Creator 中:

  • Qt Designer 用于从 Qt Widgets 设计和构建 GUI (图形用户界面)。 可以在可视化编辑器中合成和定制 Widget 或对话框,并使用不同样式和分辨率对它们进行测试。可以按设计模式 (1) 从 Qt Creator 访问 Qt Designer。
  • qmake for building applications for different target platforms. You can also use other build automation tools, such as CMake , Qbs , or Autotools. When using qmake or CMake, you specify the build system in the Projects mode (2). When using Qbs or Autotools, you open a .qbs or .am file in Qt Creator.
  • Qt Linguist 用于本地化应用程序。Qt Linguist 包含本地化应用程序通常涉及的角色 (如:开发者、翻译者及发行管理者) 工具。可以从 Qt Creator 工具菜单运行 lupdate 和 lrelease 工具。
  • Qt Assistant for viewing Qt documentation. You can also view documentation in Qt Creator. The documentation installed with Qt 5 is displayed automatically in the Help mode (3), and you can add documents to the list.

In addition, you can use the tools listed in the following table.

工具 描述
makeqpf 为嵌入式设备创建预渲染字体。
MOC (元对象编译器) 生成元对象信息为 QObject 子类。
uic (用户界面编译器) 生成 C++ 代码从用户界面文件。
RCC (资源编译器) 在构建过程中将资源嵌入到 Qt 应用程序中。
Qt D-Bus XML 编译器 (qdbusxml2cpp) 将 D-Bus 接口描述转换成 C++ 源代码的工具。
D-Bus 查看器 自省 D-Bus 对象和消息的工具。可从 Qt SDK 或 Qt 5 qttools 存储库获得。
Qt Quick 编译器 使能够构建 Qt Quick 应用程序的 QML 编译器,不必将 QML 源代码部署到目标。
Qt VS Tools 旨在希望使用 Visual Studio IDE 而非 Qt Creator 开发 Qt 应用程序的开发者。