1. 程式人生 > >QML-引入Font-awesome

QML-引入Font-awesome

ima tps info 參考 main 使用 net mage sdn

1.首先得在qml文件夾下建立字體文件,將font-awesome放入進去

技術分享圖片

2.然後在main.cpp中註冊字體

技術分享圖片

3.在界面中使用

需要在font-awesome.css中查看編碼

技術分享圖片

然後在字體中使用時必須寫上字體為fontawesom

技術分享圖片

\ufoo4就是就是字符編碼f004

結果如下

技術分享圖片

參考博文 https://blog.csdn.net/zhengtianzuo06/article/details/78505508

QML-引入Font-awesome