机器人手臂

演示如何将 C++ 后端添加到Qt Design Studio 中的 3D 项目。本示例演示如何将 C++ 后端添加到Qt Design Studio 中创建的 3D 项目。示例本身包括Qt Quick 3D 场景中的交互式工业机械臂。控制机械臂的 2D UI 是通过Qt Quick Controls 实现的。

Qt Design Studio 机器人手臂示例带有一个简单的基于 QML 的 QML 模块,位于 backend_moc/Backend/Backend_moc.qml,当与Qt Design Studio 一起使用时,该模块可作为项目的后端。C++ 应用程序将兼容的后端作为基于 C++ 的 QML 模块来实现。两个 QML 模块实现了相同的应用程序接口,从而确保了两个模块之间的兼容性。

Qt Quick 机械臂的 3D 场景定义在 content/RoboticArm.ui.qml 中。二维用户界面在 content/MainScreen.ui.qml 中实现,具有响应性,并支持明暗模式。该示例使用Qt Quick Controls 中的 Material 风格以及深色和浅色主题来实现这两种模式。

运行示例

要从 Qt Creator打开Welcome 模式,然后从Examples 中选择示例。更多信息,请参见Qt Creator: 教程:构建并运行

注: 该示例使用了Qt Quick 3D模块,该模块是.NET Framework3.0 中的一个单独项目。 Qt Online Installer.如果示例配置失败,请确保已安装Qt Quick 3D 软件包。

示例项目 @ code.qt.io

© 2025 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.