设置应用程序启动界面

开发

您可以将选定的层设置为应用程序的入口点。在目标设备上运行应用程序时,将显示所选屏幕。您只能选择一个顶级层,且该层必须为 frame 或 component 类型。 位于部分内部的层也视为顶级层,因为Figma to Qt 不会将部分转换为QML。您无法将部分本身、被跳过的页面或层设置为启动屏幕。

如果您选择了多个页面或图层,则此功能不可用。

默认情况下,最顶层的层会被设置为起始屏幕。

如果您使用 CMake 构建应用程序,并使用带有GENERATE_ENTRYPOINT 标志的qul_add_target 宏来生成应用程序的入口点,CMake 将依赖您为Project.mainFile (起始屏幕)设置的值。如果您未进行设置,构建将失败。有关更多信息,请参阅CMake:qul_add_target。

要将图层设置为启动屏幕:

  1. 在 Figma 中,选择一个图层。
  2. 在插件中,转到“首页 (Home )” > “Flow settings ”。
  3. 选择“Start screen ”。

    插件主页上的流设置。

    插件主页上的流程设置。

  4. 选择“Locate ”以跳转至 Figma 中的起始界面。
  5. 选择“预览 ”(Preview )。

另请参阅 “下载转换后的设计”和“预览转换后的设计”。

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