【QSS样式表 - ⑧】:QComboBox控件样式

setStyleSheet(R"( addNewRule { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(245, 247, 250, 255), stop:1 rgba(221, 230, 237, 255)); } QLabel { font-size: 18px; color: #333333; min-width: 60px; padding-top: 0px; padding-bottom: 0px; text-align: left; } styleLineEdit { min-height: 24px; font-size: 16px; border: 1px solid #cccccc; border-radius: 4px; padding: 4px; background-color: white; } styleLineEdit:error { border: 1px solid #e64942; } QComboBox { min-height: 80px; border: 1px solid #cccccc; border-radius: 4px; padding: 2px 20px 2px 8px; background-color: white; selection-background-color: #4a86e8; selection-color: white; font-size: 16px; } QComboBox::drop-down { subcontrol-origin: padding; subcontrol-position: top right; width: 20px; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #f0f0f0; } QComboBox::down-arrow { image: url(:/icons/down_arrow.png); width: 12px; height: 12px; } QComboBox QAbstractItemView { border: 1px solid #cccccc; border-radius: 4px; padding: 2px; background-color: white; selection-background-color: #4a86e8; selection-color: white; font-size: 16px; } QPushButton { min-height: 26px; font-size: 16px; font-weight: 500; border-radius: 4px; padding: 4px 16px; } QPushButton#m_ok { color: white; background-color: #4a86e8; border: 1px solid #4a86e8; } QPushButton#m_ok:hover { background-color: #3a76d8; } QPushButton#m_ok:pressed { background-color: #2a66c8; } QPushButton#m_cancel { color: #333333; background-color: #f0f0f0; border: 1px solid #cccccc; } QPushButton#m_cancel:hover { background-color: #e0e0e0; } QPushButton#m_cancel:pressed { background-color: #d0d0d0; } QTimeEdit { min-height: 20px; font-size: 16px; border: 1px solid #cccccc; border-radius: 2px; padding: 2px; background-color: white; } QGroupBox { font-size: 18px; color: #333333; border: 1px solid #cccccc; border-radius: 2px; padding: 5px; margin-top: 5px; } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; padding: 0 5px; } QCheckBox { font-size: 16px; color: #333333; } QRadioButton { font-size: 16px; color: #333333; } )");设置好看一些的颜色搭配,偏冷色
07-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

街 三 仔

你的鼓励是我创作的最大动力~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值