在设备上预览Qt Quick 用户界面
要在安卓设备上预览用户界面,请打开设备上的 USB 调试,并用 USB 电缆将设备连接到计算机。
要在Boot to Qt 设备上预览用户界面,请使用 USB 电缆或有线或无线连接(取决于设备)将设备连接到计算机,并配置与设备的连接。必要的工具包已预先定义,但您需要选择适合当前项目的工具包。
部署配置会将必要的文件打包并复制到设备中要运行可执行文件的位置。
注: 要在无线连接的设备上预览,请转到首选项>Devices 并连接设备。
要在设备上预览用户界面:
- 转至Projects >Build & Run 。
- 激活为设备类型预定义的套件 (1)。
- 在套件选择器中为设备选择套件 (2)。
- 选择Build >QML Preview 或选择Alt+P。
在安卓系统上
在 Android 设备上使用 USB 调试功能,从Qt Creator 创建与设备的连接,并在设备上运行预览实用程序。
在不同的 Android 设备上,调试的开启方式不同。在Developer Options 下查找USB Debugging 。在Settings >About 中多次点击Build number ,显示Developer Options 。
打开调试后,用 USB 电缆将 Android 设备连接到系统。
第一次在设备上预览用户界面时,预览实用程序会被复制到设备上,这可能需要一些时间。此后,预览速度会越来越快,因为只需将用户界面文件复制到设备上。
在Boot to Qt
在受支持的Boot to Qt 设备上预览用户界面,并按照Boot to Qt 文档中的说明进行配置。
另请参阅 Boot to Qt :文档、目标硬件的支持级别、如何设计用户界面和用户界面设计。
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.