樣式表:
QPushButton
{
padding-left: 2px;
padding-right: 10px;
border-radius: 3px;
color:rgba(54, 143, 205, 1);
border: 2px solid rgba(54, 143, 205, 1);
background-color: transparent;
}
QPushButton : hover {background-color: rgba(49, 131, 186, 1);}
QPushButton : pressed {background-color: rgba(49, 131, 186, 1);}
問題:上述樣式表的懸停按下未生效
解決方法:去除控制元件與選擇器間的空格再次執行即可生效