【Qt一键界面美化】qss使用与qss界面美化

qss界面美化,没接触过qss的朋友可以先查看css的相关知识在阅读代码,如果你不想那么麻烦只是希望能简单的对界面进行美化,可以直接使用代码,废话不多说,直接上效果。

 

  该qss文本对,按钮控件QPushButton,场景QGraphicsView,复选框QCheckBox,滚动条-垂直QScrollBar,滚动条-水平QScrollBar,时间戳控件QDateTimeEdit,输入框QLineEdit,文本label,表头QHeaderView,表格QTableView,都进行了文字色彩,背景色,边框圆滑度进行了调整与设置,代码如下     


/**********表头**********/
QHeaderView{
        border: none;
        border-bottom: 3px solid rgb(0, 160, 230);
        background: rgb(57, 58, 60);
        min-height: 30px;
        color : #EEEEEE
}
QHeaderView::section:horizontal {
        border: none;
        color: white;
        background: transparent;
        padding-left: 5px;
}
QHeaderView::section:horizontal:hover {
        background: rgb(85, 85, 85);
}
QHeaderView::section:horizontal:pressed {
        background: rgb(80, 80, 80);
}
QHeaderView::up-arrow {
        width: 13px;
        height: 11px;
        padding-right: 5px;
        subcontrol-position: center right;
}
QHeaderView::down-arrow {
        width: 13px;
        height: 11px;
        padding-right: 5px;
        subcontrol-position: center right;
}

/**********表格**********/
QTableView {
        border-radius: 4px;
        border: 1px solid rgb(45, 45, 45);
        background: rgb(57, 58, 60);
  • 6
    点赞
  • 35
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值