当前位置:网站首页>QT qcombobox QSS style settings
QT qcombobox QSS style settings
2022-07-03 09:47:00 【L-Super】
QComboBox Stylesheets are too rich , Studied for a while , Summarized records .
QComboBox Overall style
/* When not pulled down ,QComboBox The style of */
QComboBox {
border-radius: 3px;
padding: 1px 18px 1px 3px;
background: transparent;
border: 1px solid gray;
color: #333333;
border-color: #E5E5E5;
background-color: #FFFFFF;
}
/* Click on QComboBox The style of the selected item after */
QComboBox:on {
color: rgb(33, 188, 188);
background-color: #f1ee04;
}
Set up QComboBox The style of the expansion area
/* After drop-down expansion , The whole drop-down form style */
QComboBox QAbstractItemView {
outline: 1px solid #000000;/* Select the outer border of the item */
border: 1px solid yellow;/* The border of the whole drop-down form */
color: #d34b4b;
background-color: #FFFFFF; /* The background color of the whole drop-down form */
selection-color: #3377FF;/* The font color of the selected item in the drop-down box */
selection-background-color:#FFFFFF;/* The background color of the selected item in the drop-down box */
}
QComboBox Arrow pattern
/* Drop down arrow style */
QComboBox::drop-down {
subcontrol-origin: padding;/* The origin rectangle of the child control in the parent element . If this property is not specified , The default is padding. */
subcontrol-position: top right;/* The position of the drop-down box ( The upper right ) */
width: 15px;/* The width of the drop-down box */
border-left-width: 1px;/* The width of the left boundary of the drop-down box */
border-left-color: darkgray;/* The left boundary color of the drop-down box */
border-left-style: solid; /* The left boundary of the drop-down box is a solid line */
border-top-right-radius: 3px;/* The fillet radius of the upper right boundary line of the drop-down box ( Should be consistent with the whole QComboBox The fillet radius of the upper right boundary line is the same ) */
border-bottom-right-radius: 3px; /* ditto */
background: #333333;
}
/* Floating in the drop-down arrow style */
QComboBox::drop-down:hover {
background: #3cff59;
}
/* Drop down arrow style */
QComboBox::down-arrow {
width: 15px;/* The width of the drop-down arrow ( Suggestions and drop-down boxes drop-down Consistent width of ) */
background: transparent;/* The background color of the drop-down arrow */
padding: 0px 0px 0px 0px;/* Top inner margin 、 Inside right margin 、 Bottom inside margin 、 Left inner margin */
image: url(:/images/combobox_arrow_down.png);
}
/* Click the drop-down arrow style */
QComboBox::down-arrow:on {
image: url(:/images/combobox_arrow_up.png);/* Show pull up arrow */
}
QComboBox Vertical scroll bar style
/* QComboBox Vertical scroll bar in */
QComboBox QAbstractScrollArea QScrollBar:vertical {
width: 10px;
background-color: #f1ee04; /* The background color of the blank area */
}
/* Handle of vertical scroll bar ( slider ) */
QComboBox QAbstractScrollArea QScrollBar::handle:vertical {
border-radius: 5px; /* Round corners */
background: rgb(6, 68, 20);/* The background color of the small square */
}
/* Handle of vertical scroll bar ( slider ) Floating style */
QComboBox QAbstractScrollArea QScrollBar::handle:vertical:hover {
background: rgb(9, 75, 208);/* The background color of the floating small square */
}
QComboBox Refinement adjustment
It is mainly divided into editable and non editable refinement style adjustment , Some will conflict with the overall style , Detail style is preferred .
/* Property is set to editable (setEditable(true))editable when , Style of text editing area */
QComboBox:editable {
background: green;
}
/* Property set to non editable when ,QComboBox Style of text area */
QComboBox:!editable {
background: #ffffff;
}
/* Property is set to editable when , an QComboBox The style of the text area of the drop-down box */
QComboBox:editable:on {
background: green;
}
/* Set to !editable when , an QComboBox The style of the text area of the drop-down box */
QComboBox:!editable:on {
color:white;
background: green;
}
/* Property is set to editable when , The style of the arrow in the drop-down box */
QComboBox::drop-down:editable {
background: lightblue;
}
/* Property set to non editable when , The style of the arrow in the drop-down box */
QComboBox::drop-down:!editable {
background: green;
}
/* Property is set to editable when , The drop-down box expands the style of the arrow */
QComboBox::drop-down:editable:on {
background: rgb(238, 182, 144);
}
/* Property set to non editable when , The drop-down box expands the style of the arrow */
QComboBox::drop-down:!editable:on {
background: red;
}
边栏推荐
- Jetson nano custom boot icon kernel logo CBOOT logo
- MySQL environment variable configuration
- Leetcode daily question (2109. adding spaces to a string)
- Fundamentals of Electronic Technology (III)__ Fundamentals of circuit analysis__ Basic amplifier operating principle
- DSP data calculation error
- Code word in NR
- 【男保姆式】教你打开第一个微信小程序
- PolyWorks script development learning notes (I) - script development environment
- Electronic product design
- 1922. Count Good Numbers
猜你喜欢

Electronic product design, MCU development, circuit cloning
![[CSDN] C1 training problem analysis_ Part II_ Web Foundation](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[CSDN] C1 training problem analysis_ Part II_ Web Foundation

数字身份验证服务商ADVANCE.AI顺利加入深跨协 推进跨境电商行业可持续性发展

GPIO port details, Hal library operation keys

Hudi data management and storage overview

【男保姆式】教你打开第一个微信小程序

PolyWorks script development learning notes (I) - script development environment

【力扣刷题笔记(二)】特别技巧,模块突破,45道经典题目分类总结,在不断巩固中精进

Convert IP address to int
![顺利毕业[3]-博客系统 更新中。。。](/img/91/72cdea3eb3f61315595330d2c9016d.png)
顺利毕业[3]-博客系统 更新中。。。
随机推荐
Vector processor 9_ Basic multilevel interconnection network
【22毕业季】我是毕业生yo~
Leetcode daily question (2109. adding spaces to a string)
[CSDN]C1训练题解析_第三部分_JS基础
Raspberry pie installation SciPy
Analysis of the implementation principle of an open source markdown to rich text editor
Patent inquiry website
Leetcode daily question (931. minimum falling path sum)
What do software test engineers do? Pass the technology to test whether there are loopholes in the software program
Development of fire evacuation system
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 3 --blinker_ MIOT_ Light (lighting technology app control + Xiaoai classmate control)
Intelligent home design and development
Nodemcu-esp8266 development board to build Arduino ide development environment
PolyWorks script development learning notes (I) - script development environment
PRACH --- originator
[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)
uniapp 实现微信小程序全局分享及自定义分享按钮样式
The cyclic shift of PUCCH in NR channel is generated by MATLAB
The rise and fall of mobile phones in my perspective these 10 years
Matlab reads hexadecimal numbers and converts them into signed short