QT中一份用于项目的QSS样式,包括了多个控件

这篇博客详细展示了在QT项目中使用的QSS样式代码,涵盖了多个控件,如QLineEdit、QPushButton、QTableView等,通过自定义背景颜色、边框样式、圆角半径等属性,实现了一致且美观的界面设计。
摘要由CSDN通过智能技术生成
/* QWidget#frmLogin,QWidget#frmPopup,QWidget#frmHostInfo,QWidget#frmLogout,QWidget#frmConfig,QWidget#frmData,QWidget#frmDefence,QWidget#frmHost,QWidget#frmMain,QWidget#frmPwd,QWidget#frmSelect,QWidget#frmMessageBox{ */
/* border:1px solid #1B89CA; */
/* border-radius:0px; */
/* } */


/* .QFrame{ 
border:1px solid #5CACEE; 
border-radius:5px; 
 } 
*/
/* QWidget#widget_title{ */
/* background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); */
/* } */


/* QLabel#lab_Ico,QLabel#lab_Title{ */
/* border-radius:0px; */
/* color: #F0F0F0; */
/* background-color:rgba(30,30,30,100); */
/* border-style:none; */
/* } */
QWidget#Wwidget,QWidget#Pwidget{
background-color: rgb(255, 255, 255);
border-radius: 10px;
}

QWidget#diawidget{
border-bottom: 1px solid #a1a1a1;
border-left:1px solid #a1a1a1;
border-right:1px solid #a1a1a1;
border-top:0px solid #a1a1a1;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
border-top-left-radius:0px;
border-top-right-radius:0px;
}
QWidget#topwidget{
border-bottom: 0px solid #a1a1a1;
border-left:1px solid #a1a1a1;
border-right:1px solid #a1a1a1;
border-top:1px solid #a1a1a1;
    border-bottom-left-radius:0px;
border-bottom-right-radius:0px;
border-top-left-radius:10px;
border-top-right-radius:10px;
}
QDialog#ScanDataDlg{
background-color: rgb(231, 231, 231);
border-radius:0px;
}
QLabel {
background:none;
font: 16pt "PingFang SC";
color: rgb(85, 85, 85);
}
QLineEdit {
border: 1px solid #a1a1a1;
border-radius: 3px;
padding: 2px;
background:none;
font: 16pt "PingFang SC";
font: regular;
selection-background-color: rgba(176,221,244);
color: rgb(85, 85, 85);
}
QLineEdit:enabled:hover, QLineEdit:enabled:focus {
       border: 1px solid rgba(52,178,237);
}


QLineEdit:!enabled, QCheckBox:!enabled,QComboBox:!enabled{
        background-color: rgb(231, 231, 231);
}


QLineEdit[echoMode="2"] { 
lineedit-password-character: 9679; 
}
QLineEdit#doctorEdit:enabled,QLineEdit#addrEdit:enabled {
       background-color: rgba(152,211,243);
}
QLineEdit#doctorEdit:enabled:hover, QLineEdit#addrEdit:enabled:focus {
        background-color: rgba(176,221,244);
}


QGroupBox{
border: 1px solid #5CACEE;
border-radius: 3px;
font: 12pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}
QGroupBox::title {


subcontrol-position: top center;
    margin-bottom: 20px;
font: 12pt "PingFang SC";
font: regular;
color: rgb(85, 85, 85);
}




QStackedWidget#settingstackedWidget{
border: 3px solid #5CACEE;      
}
QPushButton{
color: rgb(85, 85, 85);
padding: 5px;
border-radius:3px;
background: rgba(237,237,237);
border: 1px solid rgba(207,207,207);
    /* border-image: url(:/images/button.png); */
font: 16pt "PingFang SC";
}


QPushButton[focusPolicy="0"] {
border-style: none;
border: 0px;
color: #F0F0F0;
padding: 0px;
min-height: 10px;
border-radius:3px;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5); 
}


QPushButton:hover{ 
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5CACEE, stop:1 #4F94CD);
}


QPushButton:pressed{ 
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #1B89CA, stop:1 #1077B5);
}


QPushButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max{
border-radius:0px;
color: #F0F0F0;
background-color:rgba(0,0,0,0);
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值