QIcon

最后更新于:2022-04-02 02:10:20

[TOC] ## 概述 ### qt 自带图标 mac ![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/82/bc/82bc7f32e7f171b05ac28495c780e267_745x320.png) win ![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/4f/b8/4fb84d197c5f2c85cf953c163580cca5_842x339.png) ## 示例 ### 使用系统自带的图标 ``` QAction *action1 = new QAction(tr("文件")); QStyle *style = QApplication::style(); QIcon icon1 = style->standardIcon(QStyle::SP_FileIcon); action1->setIcon(icon1); ```
';