請問我用qt designer,選擇一個qpushbutton,右鍵選單,改變樣式表,
background-color: rgb(0, 11, 210);
color: rgb(255, 255, 0);
border:none;
font: 75 10pt "微軟雅黑";
hover{background-color: rgb(0, 112, 210)}
pressed{background-color: rgb(255, 146, 132)}
提示有效樣式表
但是程式運行后,感覺按鈕按下沒有反應,背景顏色沒有改變,請問這是什么原因呢?
uj5u.com熱心網友回復:
有效樣式表只是說沒有語法錯誤,但是你加入hover和pressed的使用方法是錯誤的,他們不是屬性也不是類
*{background-color: rgb(0, 11, 210);
color: rgb(255, 255, 0);
border:none;
font: 75 10pt "微軟雅黑";}
:hover{background-color: rgb(0, 112, 210)}
:pressed{background-color: rgb(255, 146, 132)}
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/132336.html
標籤:Qt
上一篇:OpenCV預覽區域大小怎么設定
下一篇:求大神臨幸小弟的問題?
