本页内容

测试代码更改

您可以在实时预览中临时修改 QML 代码,并应用这些修改以查看其在画布上的渲染效果。例如,您可以更改颜色、字体以及组件的大小或位置。

在实时预览中测试代码更改。

要在实时预览中测试代码更改:

  1. 选择“Log in ”登录您的Qt 账户。
  2. 在代码中修改属性值。

    在实时预览中测试代码更改。

    在实时预览中测试代码更改。

  3. 选择Apply changes 将其渲染到画布上。

如果更改导致代码出错,实时预览中会显示错误信息。

实时预览中出现代码错误。

实时预览中的代码错误。

重置更改

当您与 Figma 同步时,插件会覆盖这些更改,因此若要保留这些更改,您需要在 Figma 的设计中进行修改。

要重置实时预览中的更改,请选择“重置 ”(Reset )。

另请参阅 “预览转换后的设计”和“平移与缩放”。

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