圓形按鈕樣式
- 2019 年 10 月 4 日
- 筆記
大家中秋好。月餅圓,月亮圓,中秋團團圓圓。今天就分享些關於圓的東西(圓形按鈕樣式)。
主題效果 |
默認顏色 |
懸停顏色 |
按下顏色 |
---|---|---|---|
紅色 |
#f44336 |
#d5d5d5 |
#f2f2f2 |
藍色 |
#008cba |
#d5d5d5 |
#f2f2f2 |
綠色 |
#4caf50 |
#d5d5d5 |
#f2f2f2 |
灰色 |
#e7e7e7 |
#d5d5d5 |
#f2f2f2 |
黑色 |
#555555 |
#d5d5d5 |
#f2f2f2 |
紅色圓形按鈕樣式示例
QPushButton { min-width: 100px; max-width: 100px; max-height: 100px; min-height: 100px; border-radius: 50px; font-size: 15px; color: white; background: #f44336 ; /* 默認顏色 */ } QPushButton:hover { font-size: 18px; color: white; background: #d5d5d5; /* 懸停顏色 */ } QPushButton:pressed { background: #f2f2f2 /* 按下顏色 */ }
關於更多
- 源碼示例 https://github.com/aeagean/QSS.git
- Qt君公眾號後台回復"QSS"獲取更多相關資訊。