推荐几个好的URL

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当使用Qt中的`QCalendarWidget`控件时,可以使用样式表来定制它的外观。以下是一些我认为外观漂亮的样式表: 1. 日历控件有两个部分:标题和日期表。以下样式表更改了标题颜色为蓝色,日期表中的周末颜色为红色。 ``` QCalendarWidget QHeaderView { color: blue; } QCalendarWidget QWidget#qt_calendar_navigationbar QPushButton { color: blue; } QCalendarWidget QTableView::item:selected { background-color: #d6e9c6; color: black; } QCalendarWidget QTableView::item:selected:disabled { background-color: #f1f1f1; color: #808080; } QCalendarWidget QTableView { border-width: 1px; border-style: solid; border-color: #999999; } QCalendarWidget QTableView { alternate-background-color: #ececec; } QCalendarWidget QTableView { selection-background-color: #3465a4; selection-color: white; } QCalendarWidget QTableView { font-size: 14px; } QCalendarWidget QTableView { color: black; } QCalendarWidget QTableView { selection-background-color: red; selection-color: white; } QCalendarWidget QTableView::item:hover { background-color: #f2f2f2; } ``` 2. 以下样式表更改了日期表的颜色为橙色。 ``` QCalendarWidget QTableView { background-color: #FFA500; } QCalendarWidget QTableView::item { border: 1px solid black; color: white; padding: 2px; } QCalendarWidget QTableView::item:hover { background-color: #FFC0CB; } QCalendarWidget QTableView::item:selected { background-color: #FFFFFF; color: black; } ``` 3. 以下样式表使用了一种渐变背景色和圆角边框,使日历控件看起来更现代。 ``` QCalendarWidget QWidget { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 114, 206, 255), stop:1 rgba(0, 85, 153, 255)); border: 2px solid #B2B2B2; border-radius: 10px; } QCalendarWidget QHeaderView { color: white; font-size: 16px; font-weight: bold; } QCalendarWidget QTableView { color: white; font-size: 14px; } QCalendarWidget QAbstractItemView { selection-background-color: #B2B2B2; selection-color: black; } QCalendarWidget QToolButton { font-size: 14px; color: white; border: none; } QCalendarWidget QToolButton:hover { background-color: rgba(255, 255, 255, 20); } QCalendarWidget QToolButton#qt_calendar_prevmonth { qproperty-icon: url(:/qss_icons/rc/arrow_left.png); } QCalendarWidget QToolButton#qt_calendar_nextmonth { qproperty-icon: url(:/qss_icons/rc/arrow_right.png); } ``` 这

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值