How to sub stylesheet ?
Unsolved
General and Desktop
-
Checkable items of a QListView are not derived from QCheckBox widget class. To style them use
QListView::indicator
instead ofQListView QCheckBox::indicator
. -
@_compiler said:
QListView QCheckBox::indicator {
width: 14px;
height: 14px;
border : 1px solid rgb(200,200,200);
}not working.
All stylesheet
QComboBox { border : 1px solid rgb(204,204,204); border-top : 3px solid; border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(204, 204, 204, 255), stop:0.339795 rgba(204, 204, 204, 255), stop:0.339799 rgba(244, 244, 244, 255), stop:0.662444 rgba(244, 244, 244, 255), stop:0.662469 rgba(249, 249, 249, 255), stop:1 rgba(249, 249, 249, 255)); border-left : 2px solid; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(204, 204, 204, 255), stop:0.495 rgba(204, 204, 204, 255), stop:0.505 rgba(249, 249, 249, 255), stop:1 rgba(249, 249, 249, 255)); min-width: 7em; color: rgb(40, 40, 40); } QComboBox:!editable, QComboBox::drop-down:editable { background-color: rgb(255, 255, 255); } QComboBox:!editable::hover { border : 1px solid rgb(116,116,116); border-top : 3px solid; border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(116,116,116, 255), stop:0.339795 rgba(116,116,116, 255), stop:0.339799 rgba(239, 239, 239, 255), stop:0.662444 rgba(239, 239, 239, 255), stop:0.662469 rgba(247, 247, 247, 255), stop:1 rgba(247, 247, 247, 255)); border-left : 2px solid; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(116,116,116, 255), stop:0.495 rgba(116,116,116, 255), stop:0.505 rgba(247, 247, 247, 255), stop:1 rgba(247, 247, 247, 255)); } QComboBox:!editable::focus { border : 1px solid rgb(77,144,254); border-top : 3px solid; border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(77,144,254, 255), stop:0.339795 rgba(77,144,254, 255), stop:0.339799 rgba(239, 239, 239, 255), stop:0.662444 rgba(239, 239, 239, 255), stop:0.662469 rgba(247, 247, 247, 255), stop:1 rgba(247, 247, 247, 255)); border-left : 2px solid; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(77,144,254, 255), stop:0.495 rgba(77,144,254, 255), stop:0.505 rgba(247, 247, 247, 255), stop:1 rgba(247, 247, 247, 255)); } QComboBox:!editable:on, QComboBox::drop-down:editable:on { border : 1px solid rgb(77,144,254); border-top : 3px solid; border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(77,144,254, 255), stop:0.339795 rgba(77,144,254, 255), stop:0.339799 rgba(239, 239, 239, 255), stop:0.662444 rgba(239, 239, 239, 255), stop:0.662469 rgba(247, 247, 247, 255), stop:1 rgba(247, 247, 247, 255)); border-left : 2px solid; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(77,144,254, 255), stop:0.495 rgba(77,144,254, 255), stop:0.505 rgba(247, 247, 247, 255), stop:1 rgba(247, 247, 247, 255)); } QComboBox::drop-down { border: none; } QComboBox::down-arrow { image: url(:/down.png); } QComboBox::down-arrow:on { image: url(:/active_down.png); } QComboBox QListView::item { min-height: 24px; } QListView::item:selected { color: black; background-color: rgb(231, 231, 231); } QComboBox QAbstractItemView {outline: none;} QListView QCheckBox::indicator { width: 14px; height: 14px; border : 1px solid rgb(200,200,200); }
-
not working.
Yes, and it won't. As I said: use
QListView::indicator
instead ofQListView QCheckBox::indicator
. Checkable items on a list are not QCheckBox. -
@_compiler said:
thanks.