Qt Style Sheets (QComboBox drop-down box)

/ * When not drop down, QComboBox style * / 
a QComboBox { 
    border: 1px Solid Gray;    / * frame * / 
    border -radius: 3px;    / * Fillet * / 
    padding: 18px 1px 1px 3px;    / * Font liner fill * / 
    Color: # 000 ; 
    font: 15px Normal Normal " the Microsoft YaHei " ; 
    background: transparent; 
} 

/ * after the pull-down, drop-down form the entire pattern * / 
a QComboBox QAbstractItemView { 
    Outline: Solid Gray 0px;    / * imaginary frame selected item * / 
    border: 1px Solid Yellow;    / *Drop-down form of the entire border * / 
    Color: Green; 
    background -color: Red;    / * the entire drop-down form background color * / 
    Selection -background-Color: LightGreen;    / * the entire drop-down form selected item background color * / 
} 

/ * after the pull-down, drop-down form the whole pattern of each * / 
a QComboBox QAbstractItemView :: item { 
    height: 50px;    / * the height of the item (provided pComboBox-> setView (new QListView () ); after that it act) * / 
} 

/ * after the pull-down, drop-down form over the whole of each pattern * / 
a QComboBox QAbstractItemView :: Item: hover { 
    Color: #FFFFFF; 
    background -color: LightGreen;    / * the whole crossing each drop-down form background color * /
} 

/ * After the pull-down, drop-down form the whole of each of the selected pattern * / 
a QComboBox QAbstractItemView :: Item: {Selected 
    Color: #FFFFFF; 
    background - Color: LightGreen; 
} 

/ * a QComboBox the vertical scroll bar * / 
a QComboBox QScrollBar QAbstractScrollArea: Vertical { 
    width: 10px; 
    background -color: # d0d2d4;    / * background color gray green blank area * / 
} 

a QComboBox QAbstractScrollArea QScrollBar :: handle: {Vertical 
    border -radius: 5px;    / * fillet * / 
    background : RGB ( 160. , 160. , 160. );   / * Small blocks dark gray background color LightBlue * / 
} 

a QComboBox QAbstractScrollArea QScrollBar :: handle: Vertical: hover { 
    background: RGB ( 90 , 91 is , 93 );    / * past the small blocks background color Yellow * / 
} 

/ * Set when editable (setEditable (true)) editable, style editing area * / 
QComboBox: the editable { 
    background: Green; 
} 

/ * set the non-edit (setEditable (false)) editable, QComboBox entire style! * / 
QComboBox : ! the editable { 
     background: Blue; 
} 

/ * set as editable editable, the entire QComboBox click style * / 
QComboBox: the editable: {ON 
    background: Green;
} 

/ * ! Set to non-editable editing, the whole QComboBox click style * / 
QComboBox: ! Editable: ON { 
     background: Blue; 
} 

/ * set as editable editable, drop-down box pattern * / 
QComboBox :: drop - Down: editable { 
    background: LightBlue; 
} 

/ * set as editable editable, drop-down box style click * / 
a QComboBox :: drop - Down: editable: ON { 
    background: LightGreen; 
} 

/ * ! set when the non-edit editable , drop-down box pattern * / 
a QComboBox :: drop -down :! editable { 
    background: LightBlue; 
} 

/ *! Set to non editing editable, drop-down box style click * / 
a QComboBox :: drop -down :! the editable: ON { 
    background: LightGreen; 
} 

/ * Click a QComboBox * / 
a QComboBox: {ON 
} 

/ * dropdown box style * / 
:: drop a QComboBox - Down { 
    subcontrol -origin: padding;    / * child controls the origin of the rectangle in the parent element. If this attribute is not specified, the default is padding. * / 
    Subcontrol -position: Top right;    / * in drop-down box (upper right) * / 
    width: 15px;    / * drop-down box width * / 

    border -left-width: 1px;    / * left boundary line of the drop-down box width * / 
    border -left-Color: DarkGray;    / * drop-down box to the left boundary line color * / 
    border -left-style: Solid;    / * drop-down box to the left of the solid line boundary * / 
    border -top-RADIUS-right: 3px;    / * upper right corner radius of the boundary line of the drop-down box (and should QComboBox entire right upper radius boundary coincides) * / 
    border -bottom-rADIUS-right: 3px;    / * supra * / 
} 

/ * the down arrow pattern * / 
QComboBox Down :: - arrow arrow { 
    width: 15px;    / * the width of the drop-down arrow (in accordance with the width of the recommended drop-down of the drop-down box) * / 
    background: transparent;    / * the down arrow of the background color * /
    padding: 0px 0px 0px 0px;    / * padding on the inner right margins, the lower margins, the left margin * / 
    Image: URL (: / Images / combobox_arrow_down.png); 
} 

/ * Click the down arrow * / 
a QComboBox :: Down - arrow arrow: ON { 
    Image: URL (: /images/combobox_arrow_up.png);    / * drop-down arrow * / 
}

Guess you like

Origin www.cnblogs.com/tingtaishou/p/12155574.html