設置QPushButton的ICon圖標

#FrameName #pushButton{
    font-size:24px;
    font-family:MicrosoftYaHei;
    font-weight:bold;
    color:rgba(77,77,77,1);

    qproperty-iconSize:150px 112px;
    qproperty-icon: url(data/images/userMangaer/teacher.png) off, url(data/images/userMangaer/teacher-focus.png) on;
}

 

以上爲通過QSS來設置QPushButton的方法。

      1、通過qproperty-iconSize來設置ICON的尺寸; 

      2、通過qproperty-icon:來設置ICON。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章