Save assets
If a Figma layer has properties that have no equivalent in QML, it is converted into an asset and an Image QML type is created for it. You can select the asset file format and create high-DPI versions of asset files.
Select asset file format
To save assets in PNG or JPG format:
- In the plugin, select
(Settings).
The Assets section in the Settings tab in the plugin.
- In Export format, select PNG or JPG.
Create high-DPI versions of assets
To take advantage of the increased pixel density of high-DPI displays, an application should include high-DPI versions of static image assets. Developers can use a special naming convention for the high density assets, for example logo@2x.png
, and load both the normal density image and the high-density image into a QIcon. Qt automatically chooses the best representation for the target display at runtime. For more information, see High DPI, High DPI Icons, and Scalable User Interfaces.
To create high-DPI versions of asset files, select (Settings) and then select Generate high-DPI assets.
See also Convert designs and Render layers as images.
© 2024 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.