Qt5.9設置pushButton按鈕背景色和字體顏色

本博客主要總結Qt中設置pushButton按鈕的背景色和字體顏色,具體的內容如所述:   1.1設置背景色可以用函數setStyleSheet("background: rgb(0,255,0));   1.2設置字體顏色用函數setStyleSheet("color: red);   1.3具體的代碼如下圖所示:     1.4程序運行後的效果圖如圖所示: pushButton按鈕初始樣式(沒
相關文章
相關標籤/搜索