|
Size: 33
Comment:
|
Size: 1422
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| QSS directive matching explains | QSS on control explained == 1, Basic concept introduction == === a, basic format directive following by declearations. === {{{ }}} === b, more than one directives can be jointed for a declearation === {{{ /*CCListView, QListView, QComboBox, QPushButton, QMessageBox all have 16 pt font-size*/ CCListView, QListView, QComboBox, QPushButton,QMessageBox { }}} === c, for some widget they have state can use ":" to indicate state. === {{{ }}} === d, can also select a widget by one of its attribute using "[" and "]". === {{{ }}} === e, when a property of a widget was not found in a more specific directive, the lest specific directive will be used. === {{{ /*all CCDDPushButton will have font-size 11pt*/ CCDDPushButton { font-size: 11pt; } /*only the enabled CCDDPushButton will have the back stylish border and background*/ CCDDPushButton::enabled { border-style: outset; border-width: 3px; border-radius: 10px; border-color: #948E8C; background: qlineargradient( x1:0, y1:0, x2:0, y2:1, stop:0 #ffe0cd, stop: 0.4 #ffb587, stop: 0.5 #ff904b, stop:1 #ff6200 ); } }}} = Examples = = All the Red Text indicate the Directive with link to their Widget. = == 1, ccmenubar, ccexplore -- the menu programs. == {{attachment:ccmenubar_labeled.png}} == 2, gui aad programs == |
QSS on control explained
1, Basic concept introduction
a, basic format directive following by declearations.
b, more than one directives can be jointed for a declearation
/*CCListView, QListView, QComboBox, QPushButton, QMessageBox all have 16 pt font-size*/
CCListView, QListView, QComboBox, QPushButton,QMessageBox {
c, for some widget they have state can use ":" to indicate state.
d, can also select a widget by one of its attribute using "[" and "]".
e, when a property of a widget was not found in a more specific directive, the lest specific directive will be used.
/*all CCDDPushButton will have font-size 11pt*/
CCDDPushButton {
font-size: 11pt;
}
/*only the enabled CCDDPushButton will have the back stylish border and background*/
CCDDPushButton::enabled {
border-style: outset;
border-width: 3px;
border-radius: 10px;
border-color: #948E8C;
background: qlineargradient(
x1:0, y1:0, x2:0, y2:1,
stop:0 #ffe0cd,
stop: 0.4 #ffb587,
stop: 0.5 #ff904b,
stop:1 #ff6200
);
}
Examples
All the Red Text indicate the Directive with link to their Widget.
1, ccmenubar, ccexplore -- the menu programs.
