//****QPushButton********//
QPushButton
{
color: rgb(255, 255, 255);
background-color:rgbrgb(0, 161, 231);/*背景色*/
border-style:outset; /*边框风格*/
border-width:0px;/*边框宽度*/
border-color:rgb(10, 46,112); /*边框颜色*/
border-radius:0px; /*边框倒角*/
font:bold 14px; /*字体*/
font-family: Segoe UI;
min-width:100px;/*控件最小宽度*/
min-height:20px;/*控件最小高度*/
padding:4px;/*内边距*/
}

QPushButton
{
color: rgb(255, 255, 255);
background-color:rgb(0, 161, 231);/*背景色*/
border-style:outset; /*边框风格*/
border-width:0px;/*边框宽度*/
border-color:rgb(10, 46,112); /*边框颜色*/
border-radius:0px; /*边框倒角*/
min-width:80px;/*控件最小宽度*/
min-height:20px;/*控件最小高度*/
padding:4px;/*内边距*/
}
QPushButton::hover{
background-color: rgb(90, 106, 255);
color: rgb(240, 240, 240);
}
QPushButton::pressed{
background-color: rgb(31, 54, 185);
color: rgb(240, 220, 240);
}
//text
"QPushButton”
"{"
"color: rgb(255, 255, 255);"
" background-color:%1;/*背景色*/"
" border-style:outset; /*边框风格*/"
" border-width:0px;/*边框宽度*/
" border-color:rgb(10, 46,112); /*边框颜色*/"
" border-radius:0px; /*边框倒角*/"
" min-width:80px;/*控件最小宽度*/"
" min-height:20px;/*控件最小高度*/"
" padding:4px;/*内边距*/"
" color: %2;"
"}"
"QPushButton::hover{"
" background-color: rgb(90, 106, 255);"
"color: rgb(240, 240, 240);"
"}"
"QPushButton::pressed{"
" background-color: rgb(31, 54, 185);"
"color: rgb(240, 220, 240);"
"}";

//****QTreeWidget********//
QTreeWidget {
background-color: rgb(255, 255, 255);
border: none;
border-radius: 3px;
color: rgb(0, 0, 0);
}

QTreeWidget::item {
padding: 5px;
color: rgb(50, 50, 50);
}

QTreeWidget::item:hover {
background-color: rgb(200, 200, 200);
}

QTreeWidget::item:selected {
background-color: rgb(0, 161, 231);
color: rgb(255, 255, 255);
}



//****QTabWidget********//
QTabWidget::pane {
background-color: rgb(240, 240, 240);
border: none;
border-radius: 0px;

}
QTabBar::tab {
padding: 5px;
color: rgb(50, 50, 50);
min-width:100px;/*控件最小宽度*/
min-height:20px;/*控件最小高度*/
border-style:inset; /*边框风格*/

}
QTabBar::tab:hover {
background-color: rgb(200, 200, 200);
}
QTabBar::tab:selected {
background-color: rgb(255, 255, 255);
color:rgb(0, 161, 231);
border-bottom-width:2px;
border-bottom-color: rgb(0, 161, 231);
}

//****QSpinBox********//
QSpinBox {
background-color: rgb(255, 255, 255);
border: 1px solid rgb(0, 161, 231);
border-radius: 3px;
padding: 0px;
color: rgb(0, 161, 231);
height:20;
}
QSpinBox::up-button {
border-image: url(:/icons/spbup2x.png);
height:10;
}
QSpinBox::down-button {
height:9;
border-image: url(:/icons/spbdown.png);
}
QSpinBox::up-button:hover {
border-image: url(:/icons/comup.png);
}
QSpinBox::down-button:hover {
border-image: url(:/icons/comdown.png);
}
QSpinBox::up-button:pressed{
border-image: url(:/icons/comup.png);
}
QSpinBox::down-button:pressed {
border-image: url(:/icons/comdown.png);
}


//****QGroupBox********//
QGroupBox{
background-color: rgb(0, 161, 231);
color: rgb(255, 255, 255);
}
//旧的样式颜色
background-color: rgb(35,141,197);color: white
RGBA(0, 161, 231, 1)

////////////QDoubleSpinBox 1 ////////////////////////
QDoubleSpinBox
{
border: 1px solid #00A1E7;
}
QAbstractSpinBox::up-button
{
subcontrol-origin: border;
image: url(:/icon/icon/SliceUp.png);
width: 30px;
height: 20px;
}
QAbstractSpinBox::down-button
{
subcontrol-origin: border;
image: url(:/icon/icon/SliceDown.png);
width: 30px;
height: 20px;
}


////////////QDoubleSpinBox 2 ////////////////////////
QDoubleSpinBox {
background-color: rgb(255, 255, 255);
border: 1px solid rgb(0, 161, 231);
border-radius: 3px;
padding: 0px;
color: rgb(0, 161, 231);
height:20;
}

QDoubleSpinBox::up-button {
border-image: url(:/icons/spbup2x.png);
height:9;
}
QDoubleSpinBox::down-button {
height:10;
border-image: url(:/icons/spbdown.png);
}

QDoubleSpinBox::up-button:hover {
border-image: url(:/icons/comup.png);
}
QDoubleSpinBox::down-button:hover {
border-image: url(:/icons/comdown.png);
}

QDoubleSpinBox::up-button:pressed{
border-image: url(:/icons/comup.png);
}
QDoubleSpinBox::down-button:pressed {
border-image: url(:/icons/comdown.png);
}



/////////////QComboBox////////////////////////////////////
QComboBox {
color: rgb(24, 170, 233);
background-color: rgb(229, 246, 253);/*背景颜色*/
border-radius: 1px;/*圆角*/
padding: 1px 2px 1px 2px; /*针对于组合框中的文本内容*/
text-align:bottom;
min-width: 10; /*# 组合框的最小宽度*/
padding-left: 10px;/*左侧边距*/
}
/*QCombobox右侧按钮*/
QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;/*放于右方顶部*/
width: 10px;/*设置按钮范围宽度*/
/*border-radius: 15px;
border-left-width: 1px;
border-left-color: darkgray;
border-left-style: solid;*/
color: rgb(153, 85, 255);
border-top-right-radius: 3px;/*设置边框圆角*/
border-bottom-right-radius: 3px;
/*padding-right: 50px;*/

}
/*QCombobox右侧按钮的箭头图标*/
QComboBox::down-arrow
{
image: url(:/icons/comdown2x.png);
width: 12px;/*设置该图标的宽高*/
height: 12px;
}

/* 下拉后,整个下拉窗体样式 */
QComboBox QAbstractItemView {
border: 0px solid #f3f3f3;/*边框宽度、线形、颜色*/
background-color: rgb(255, 255, 255);/*背景颜色*/
border-radius: 1px;/*圆角*/
padding: 1px 1px 1px 1px; /*针对于组合框中的文本内容*/
min-width: 10; /*# 组合框的最小宽度*/
}

/* 下拉后,整个下拉窗体每项的样式 */
QComboBox QAbstractItemView::item {
border-radius: 0px;/*圆角*/
height: 30px; /* 项的高度(设置pComboBox->setView(new QListView());后,该项才起作用) */
background-color: rgb(247, 250, 255);
}

/* 下拉后,整个下拉窗体被选择的每项的样式 */
QComboBox QAbstractItemView::item:selected {
color: rgb(24, 170, 233);
background-color: rgb(229, 246, 253);/*背景颜色*/
}

////////QCheckBox /////////////////////////////////////////////
QCheckBox{
spacing: 5px;
}
QCheckBox::indicator {
width: 17px;
height: 17px;
}
QCheckBox::indicator:enabled:unchecked {
border-image: url(:/icons/check2x.png);
}
QCheckBox::indicator:enabled:unchecked:hover {
border-image: url(:/icons/check.png);
}
QCheckBox::indicator:enabled:unchecked:pressed {
border-image: url(:/icons/check2x.png);
}
QCheckBox::indicator:enabled:checked {
border-image: url(:/icons/checked2x.png);
}
QCheckBox::indicator:enabled:checked:hover {
border-image: url(:/icons/checked.png);
}
QCheckBox::indicator:enabled:checked:pressed {
border-image: url(:/icons/checked2x.png);
}
QCheckBox::indicator:enabled:indeterminate {
border-image: url(:/icons/checked2x.png);
}
QCheckBox::indicator:enabled:indeterminate:hover {
border-image: url(:/icons/checked2x.png);
}
QCheckBox::indicator:enabled:indeterminate:pressed {
border-image: url(:/icons/checked2x.png)

}

/////////////////////////////////////////////////////
QLineEdit{
border: 1px solid rgb(0, 161, 231);
}

posted on 2023-09-27 15:32  七星落地  阅读(64)  评论(0编辑  收藏  举报