为远程 Linux 设备开发

如果计算机上安装了为嵌入式 Linux 设备构建应用程序的工具链,可将其添加到包含设备类型Remote Linux Device工具包中,以便为其构建应用程序并在设备上运行。

使用向导将远程 Linux 设备连接到计算机。稍后可在首选项>Devices >Devices 中编辑设置。

设备偏好设置 "设备 "选项卡中的远程 Linux 设备

保护设备连接

要保护Qt Creator 和设备之间的连接,请使用OpenSSH通过 SSH 协议进行远程登录。Qt Creator 不提供 OpenSSH 套件,因此请下载并安装到计算机上。然后,在Qt Creator 中配置工具的路径。

身份验证需要密码或 SSH 公钥和私钥对。如果没有 SSH 密钥,可使用ssh-keygen 工具在Qt Creator 中创建。

注意: Qt Creator 不存储密码,因此如果使用密码验证,则可能需要在每次连接设备时输入密码,如果启用了缓存,则需要在每次重启Qt Creator 时输入密码。

如果经常出现超时,可以考虑使用基于密钥的身份验证。使用ssh-keygen 工具在Qt Creator 中创建 SSH 密钥。

在 macOS 和 Linux 上,进入首选项>Devices >SSH ,在Connection sharing timeout 字段中增加共享 SSH 连接的时间(分钟)。Windows 不支持共享连接。

设备偏好设置中的 SSH 选项卡

另请参阅 添加 Docker 设备如何:为远程 Linux 开发Qt Application Manager 中运行远程 Linux 部署配置远程 Linux 运行设置

Copyright © The Qt Company Ltd. and other contributors. 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.