1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the documentation of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:BSD$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** BSD License Usage
18** Alternatively, you may use this file under the terms of the BSD license
19** as follows:
20**
21** "Redistribution and use in source and binary forms, with or without
22** modification, are permitted provided that the following conditions are
23** met:
24**   * Redistributions of source code must retain the above copyright
25**     notice, this list of conditions and the following disclaimer.
26**   * Redistributions in binary form must reproduce the above copyright
27**     notice, this list of conditions and the following disclaimer in
28**     the documentation and/or other materials provided with the
29**     distribution.
30**   * Neither the name of The Qt Company Ltd nor the names of its
31**     contributors may be used to endorse or promote products derived
32**     from this software without specific prior written permission.
33**
34**
35** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
36** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
38** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
39** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
42** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
43** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
44** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
46**
47** $QT_END_LICENSE$
48**
49****************************************************************************/
50
51//! [0]
52QLineEdit { background: yellow }
53QCheckBox { color: red }
54//! [0]
55
56
57//! [1]
58QPushButton { color: red }
59//! [1]
60
61
62//! [2]
63QPushButton, QLineEdit, QComboBox { color: red }
64//! [2]
65
66
67//! [3]
68QPushButton { color: red }
69QLineEdit { color: red }
70QComboBox { color: red }
71//! [3]
72
73
74//! [4]
75QPushButton { color: red; background-color: white }
76//! [4]
77
78
79//! [5]
80QComboBox::drop-down { image: url(dropdown.png) }
81//! [5]
82
83
84//! [6]
85QComboBox {
86    margin-right: 20px;
87}
88QComboBox::drop-down {
89    subcontrol-origin: margin;
90}
91//! [6]
92
93
94//! [7]
95QComboBox::down-arrow {
96    image: url(down_arrow.png);
97}
98QComboBox::down-arrow:pressed {
99    position: relative;
100    top: 1px; left: 1px;
101}
102//! [7]
103
104
105//! [8]
106QPushButton:hover { color: white }
107//! [8]
108
109
110//! [9]
111QRadioButton:!hover { color: red }
112//! [9]
113
114
115//! [10]
116QCheckBox:hover:checked { color: white }
117//! [10]
118
119
120//! [11]
121QPushButton:hover:!pressed { color: blue; }
122//! [11]
123
124
125//! [12]
126QCheckBox:hover, QCheckBox:checked { color: white }
127//! [12]
128
129
130//! [13]
131QComboBox::drop-down:hover { image: url(dropdown_bright.png) }
132//! [13]
133
134
135//! [14]
136QPushButton#okButton { color: gray }
137QPushButton { color: red }
138//! [14]
139
140
141//! [15]
142QPushButton:hover { color: white }
143QPushButton { color: red }
144//! [15]
145
146
147//! [16]
148QPushButton:hover { color: white }
149QPushButton:enabled { color: red }
150//! [16]
151
152
153//! [17]
154QPushButton:enabled { color: red }
155QPushButton:hover { color: white }
156//! [17]
157
158
159//! [18]
160QPushButton:hover:enabled { color: white }
161QPushButton:enabled { color: red }
162//! [18]
163
164
165//! [19]
166QPushButton { color: red }
167QAbstractButton { color: gray }
168//! [19]
169
170
171//! [20]
172*             {}  /* a=0 b=0 c=0 -> specificity =   0 */
173LI            {}  /* a=0 b=0 c=1 -> specificity =   1 */
174UL LI         {}  /* a=0 b=0 c=2 -> specificity =   2 */
175UL OL+LI      {}  /* a=0 b=0 c=3 -> specificity =   3 */
176H1 + *[REL=up]{}  /* a=0 b=1 c=1 -> specificity =  11 */
177UL OL LI.red  {}  /* a=0 b=1 c=3 -> specificity =  13 */
178LI.red.level  {}  /* a=0 b=2 c=1 -> specificity =  21 */
179#x34y         {}  /* a=1 b=0 c=0 -> specificity = 100 */
180//! [20]
181
182
183//! [28]
184MyLabel { qproperty-pixmap: url(pixmap.png); }
185MyGroupBox { qproperty-titleColor: rgb(100, 200, 100); }
186QPushButton { qproperty-iconSize: 20px 20px; }
187//! [28]
188
189
190//! [30]
191QPushButton { background-color: red; border: none; }
192//! [30]
193
194
195//! [31]
196QToolButton { background-color: red; border: none; }
197//! [31]
198
199
200//! [33]
201QTreeView {
202    alternate-background-color: blue;
203    background: yellow;
204}
205//! [33]
206
207
208//! [34]
209QTextEdit { background: yellow }
210//! [34]
211
212
213//! [35]
214QLabel {
215    background-image: url(dense6pattern.png);
216    background-repeat: repeat-xy;
217}
218//! [35]
219
220
221//! [36]
222QLabel { background-color: yellow }
223QLineEdit { background-color: rgb(255, 0, 0) }
224//! [36]
225
226
227//! [37]
228QFrame { background-image: url(:/images/hydro.png) }
229//! [37]
230
231
232//! [38]
233QFrame {
234    background: white url(:/images/ring.png);
235    background-repeat: repeat-y;
236    background-position: left;
237}
238//! [38]
239
240
241//! [39]
242QFrame {
243    background: url(:/images/footer.png);
244    background-position: bottom left;
245}
246//! [39]
247
248
249//! [40]
250QTextEdit {
251    background-image: url("leaves.png");
252    background-attachment: fixed;
253}
254//! [40]
255
256
257//! [41]
258QFrame {
259    background-image: url(:/images/header.png);
260    background-position: top left;
261    background-origin: content;
262    background-clip: padding;
263}
264//! [41]
265
266
267//! [42]
268QFrame {
269    background-image: url(:/images/header.png);
270    background-position: top left;
271    background-origin: content;
272}
273//! [42]
274
275
276//! [43]
277QLineEdit { border: 1px solid white }
278//! [43]
279
280
281//! [44]
282QLineEdit {
283    border-width: 1px;
284    border-style: solid;
285    border-color: white;
286}
287//! [44]
288
289
290//! [45]
291QLineEdit {
292    border-width: 1px;
293    border-style: solid;
294    border-radius: 4px;
295}
296//! [45]
297
298
299//! [46]
300QLineEdit {
301    border-width: 1px;
302    border-style: solid;
303    border-color: blue;
304}
305//! [46]
306
307
308//! [47]
309QLineEdit {
310    border-width: 2px;
311    border-style: solid;
312    border-color: darkblue;
313}
314//! [47]
315
316
317//! [48]
318QSpinBox::down-button { bottom: 2px }
319//! [48]
320
321
322//! [49]
323* { button-layout: 2 }
324//! [49]
325
326
327//! [50]
328QPushButton { color: red }
329//! [50]
330
331
332//! [51]
333QDialogButtonBox { dialogbuttonbox-buttons-have-icons: 1; }
334//! [51]
335
336
337//! [52]
338* { etch-disabled-text: 1 }
339//! [52]
340
341
342//! [53]
343QCheckBox { font: bold italic large "Times New Roman" }
344//! [53]
345
346
347//! [54]
348QCheckBox { font-family: "New Century Schoolbook" }
349//! [54]
350
351
352//! [55]
353QTextEdit { font-size: 12px }
354//! [55]
355
356
357//! [56]
358QTextEdit { font-style: italic }
359//! [56]
360
361
362//! [57]
363* { gridline-color: gray }
364//! [57]
365
366
367//! [58]
368QSpinBox::down-button { height: 10px }
369//! [58]
370
371
372//! [59]
373// implicitly sets the size of down-button to the
374// size of spindown.png
375QSpinBox::down-button { image: url(:/images/spindown.png) }
376//! [59]
377
378
379//! [60]
380QSpinBox::down-button { left: 2px }
381//! [60]
382
383
384//! [61]
385* { lineedit-password-character: 9679 }
386//! [61]
387
388
389//! [62]
390QLineEdit { margin: 2px }
391//! [62]
392
393
394//! [63]
395QSpinBox { max-height: 24px }
396//! [63]
397
398
399//! [64]
400QComboBox { max-width: 72px }
401//! [64]
402
403
404//! [65]
405QMessageBox { messagebox-text-interaction-flags: 5 }
406//! [65]
407
408
409//! [66]
410QComboBox { min-height: 24px }
411//! [66]
412
413
414//! [67]
415QComboBox { min-width: 72px }
416//! [67]
417
418
419//! [68]
420QToolTip { opacity: 223 }
421//! [68]
422
423
424//! [69]
425QLineEdit { padding: 3px }
426//! [69]
427
428
429//! [70]
430QSpinBox::down-button { right: 2px }
431//! [70]
432
433
434//! [71]
435QTextEdit { selection-background-color: darkblue }
436//! [71]
437
438
439//! [72]
440QTextEdit { selection-color: white }
441//! [72]
442
443
444//! [73]
445* { show-decoration-selected: 1 }
446//! [73]
447
448
449//! [74]
450QMenuBar { spacing: 10 }
451//! [74]
452
453
454//! [75]
455QSpinBox::up-button {
456    image: url(:/images/spinup.png);
457    subcontrol-origin: content;
458    subcontrol-position: right top;
459}
460//! [75]
461
462
463//! [76]
464QSpinBox::down-button {
465    image: url(:/images/spindown.png);
466    subcontrol-origin: padding;
467    subcontrol-position: right bottom;
468}
469//! [76]
470
471
472//! [77]
473QPushButton {
474    text-align: left;
475}
476//! [77]
477
478
479//! [78]
480QSpinBox::up-button { top: 2px }
481//! [78]
482
483
484//! [79]
485QSpinBox::up-button { width: 12px }
486//! [79]
487
488
489//! [80]
490QTextEdit { background-position: bottom center }
491//! [80]
492
493
494//! [81]
495QDialog { etch-disabled-text: 1 }
496//! [81]
497
498
499//! [82]
500QLabel { border-color: red }   /* red red red red */
501QLabel { border-color: red blue } /* red blue red blue */
502QLabel { border-color: red blue green } /* red blue green blue */
503QLabel { border-color: red blue green yellow }
504/* red blue green yellow */
505//! [82]
506
507
508//! [83]
509QLabel { border-width: 1px }                    /* 1px 1px 1px 1px */
510QLabel { border-width: 1px 2px }                /* 1px 2px 1px 2px */
511QLabel { border-width: 1px 2px 3px }            /* 1px 2px 3px 2px */
512QLabel { border-width: 1px 2px 3px 4px }        /* 1px 2px 3px 4px */
513//! [83]
514
515
516//! [84]
517QLabel { border-color: red }                      /* opaque red */
518QLabel { border-color: #FF0000 }                  /* opaque red */
519QLabel { border-color: rgba(255, 0, 0, 75%) }     /* 75% opaque red */
520QLabel { border-color: rgb(255, 0, 0) }           /* opaque red */
521QLabel { border-color: rgb(100%, 0%, 0%) }        /* opaque red */
522QLabel { border-color: hsv(60, 100%, 100%) }      /* opaque yellow */
523QLabel { border-color: hsva(240, 255, 255, 75%) } /* 75% blue */
524QLabel { border-color: hsl(60, 100%, 50%) }       /* opaque yellow */
525QLabel { border-color: hsla(240, 255, 50%, 75%) } /* 75% blue */
526//! [84]
527
528
529//! [85]
530/* linear gradient from white to green */
531QTextEdit {
532    background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
533                stop:0 white, stop: 0.4 gray, stop:1 green)
534}
535
536/* linear gradient from white to green */
537QTextEdit {
538    background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
539                stop:0 white, stop: 0.4 rgba(10, 20, 30, 40),
540                stop:1 rgb(0, 200, 230, 200))
541}
542
543
544/* conical gradient from white to green */
545QTextEdit {
546    background: qconicalgradient(cx:0.5, cy:0.5, angle:30,
547                stop:0 white, stop:1 #00FF00)
548}
549
550/* radial gradient from white to green */
551QTextEdit {
552    background: qradialgradient(cx:0, cy:0, radius: 1,
553                fx:0.5, fy:0.5, stop:0 white, stop:1 green)
554}
555//! [85]
556
557
558//! [86]
559* {
560    file-icon: url(file.png),
561               url(file_selected.png) selected;
562  }
563
564QMessageBox {
565    dialogbuttonbox-buttons-have-icons: true;
566    dialog-ok-icon: url(ok.svg);
567    dialog-cancel-icon: url(cancel.png),
568                        url(grayed_cancel.png) disabled;
569}
570//! [86]
571
572
573//! [87]
574QPushButton { color: palette(dark); }
575//! [87]
576
577
578//! [94]
579*[mandatoryField="true"] { background-color: yellow }
580//! [94]
581
582
583//! [96]
584QPushButton#evilButton { background-color: red }
585//! [96]
586
587
588//! [97]
589QPushButton#evilButton {
590    background-color: red;
591    border-style: outset;
592    border-width: 2px;
593    border-color: beige;
594}
595//! [97]
596
597
598//! [98]
599QPushButton#evilButton {
600    background-color: red;
601    border-style: outset;
602    border-width: 2px;
603    border-radius: 10px;
604    border-color: beige;
605    font: bold 14px;
606    min-width: 10em;
607    padding: 6px;
608}
609//! [98]
610
611
612//! [99]
613QPushButton#evilButton {
614    background-color: red;
615    border-style: outset;
616    border-width: 2px;
617    border-radius: 10px;
618    border-color: beige;
619    font: bold 14px;
620    min-width: 10em;
621    padding: 6px;
622}
623QPushButton#evilButton:pressed {
624    background-color: rgb(224, 0, 0);
625    border-style: inset;
626}
627//! [99]
628
629
630//! [100]
631QPushButton#evilButton::menu-indicator {
632    image: url(myindicator.png);
633}
634//! [100]
635
636
637//! [101]
638QPushButton::menu-indicator {
639    image: url(myindicator.png);
640    subcontrol-position: right center;
641    subcontrol-origin: padding;
642    left: -2px;
643}
644//! [101]
645
646
647//! [102]
648QLineEdit { color: red }
649//! [102]
650
651
652//! [103]
653QLineEdit { color: red }
654QLineEdit[readOnly="true"] { color: gray }
655//! [103]
656
657
658//! [104]
659QLineEdit { color: red }
660QLineEdit[readOnly="true"] { color: gray }
661#registrationDialog QLineEdit { color: brown }
662//! [104]
663
664
665//! [105]
666QLineEdit { color: red }
667QLineEdit[readOnly="true"] { color: gray }
668QDialog QLineEdit { color: brown }
669//! [105]
670
671
672//! [106]
673QTextEdit, QListView {
674    background-color: white;
675    background-image: url(draft.png);
676    background-attachment: scroll;
677}
678//! [106]
679
680
681//! [107]
682QTextEdit, QListView {
683    background-color: white;
684    background-image: url(draft.png);
685    background-attachment: fixed;
686}
687//! [107]
688
689
690//! [108]
691QCheckBox {
692    spacing: 5px;
693}
694
695QCheckBox::indicator {
696    width: 13px;
697    height: 13px;
698}
699
700QCheckBox::indicator:unchecked {
701    image: url(:/images/checkbox_unchecked.png);
702}
703
704QCheckBox::indicator:unchecked:hover {
705    image: url(:/images/checkbox_unchecked_hover.png);
706}
707
708QCheckBox::indicator:unchecked:pressed {
709    image: url(:/images/checkbox_unchecked_pressed.png);
710}
711
712QCheckBox::indicator:checked {
713    image: url(:/images/checkbox_checked.png);
714}
715
716QCheckBox::indicator:checked:hover {
717    image: url(:/images/checkbox_checked_hover.png);
718}
719
720QCheckBox::indicator:checked:pressed {
721    image: url(:/images/checkbox_checked_pressed.png);
722}
723
724QCheckBox::indicator:indeterminate:hover {
725    image: url(:/images/checkbox_indeterminate_hover.png);
726}
727
728QCheckBox::indicator:indeterminate:pressed {
729    image: url(:/images/checkbox_indeterminate_pressed.png);
730}
731//! [108]
732
733
734//! [109]
735QComboBox {
736    border: 1px solid gray;
737    border-radius: 3px;
738    padding: 1px 18px 1px 3px;
739    min-width: 6em;
740}
741
742QComboBox:editable {
743    background: white;
744}
745
746QComboBox:!editable, QComboBox::drop-down:editable {
747     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
748                                 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
749                                 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
750}
751
752/* QComboBox gets the "on" state when the popup is open */
753QComboBox:!editable:on, QComboBox::drop-down:editable:on {
754    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
755                                stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
756                                stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
757}
758
759QComboBox:on { /* shift the text when the popup opens */
760    padding-top: 3px;
761    padding-left: 4px;
762}
763
764QComboBox::drop-down {
765    subcontrol-origin: padding;
766    subcontrol-position: top right;
767    width: 15px;
768
769    border-left-width: 1px;
770    border-left-color: darkgray;
771    border-left-style: solid; /* just a single line */
772    border-top-right-radius: 3px; /* same radius as the QComboBox */
773    border-bottom-right-radius: 3px;
774}
775
776QComboBox::down-arrow {
777    image: url(/usr/share/icons/crystalsvg/16x16/actions/1downarrow.png);
778}
779
780QComboBox::down-arrow:on { /* shift the arrow when popup is open */
781    top: 1px;
782    left: 1px;
783}
784//! [109]
785
786
787//! [110]
788QComboBox QAbstractItemView {
789    border: 2px solid darkgray;
790    selection-background-color: lightgray;
791}
792//! [110]
793
794
795//! [111]
796QDockWidget {
797    border: 1px solid lightgray;
798    titlebar-close-icon: url(close.png);
799    titlebar-normal-icon: url(undock.png);
800}
801
802QDockWidget::title {
803    text-align: left; /* align the text to the left */
804    background: lightgray;
805    padding-left: 5px;
806}
807
808QDockWidget::close-button, QDockWidget::float-button {
809    border: 1px solid transparent;
810    background: darkgray;
811    padding: 0px;
812}
813
814QDockWidget::close-button:hover, QDockWidget::float-button:hover {
815    background: gray;
816}
817
818QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {
819    padding: 1px -1px -1px 1px;
820}
821//! [111]
822
823
824//! [112]
825QDockWidget {
826    border: 1px solid lightgray;
827    titlebar-close-icon: url(close.png);
828    titlebar-normal-icon: url(float.png);
829}
830
831QDockWidget::title {
832    text-align: left;
833    background: lightgray;
834    padding-left: 35px;
835}
836
837QDockWidget::close-button, QDockWidget::float-button {
838    background: darkgray;
839    padding: 0px;
840    icon-size: 14px; /* maximum icon size */
841}
842
843QDockWidget::close-button:hover, QDockWidget::float-button:hover {
844    background: gray;
845}
846
847QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {
848    padding: 1px -1px -1px 1px;
849}
850
851QDockWidget::close-button {
852    subcontrol-position: top left;
853    subcontrol-origin: margin;
854    position: absolute;
855    top: 0px; left: 0px; bottom: 0px;
856    width: 14px;
857}
858
859QDockWidget::float-button {
860    subcontrol-position: top left;
861    subcontrol-origin: margin;
862    position: absolute;
863    top: 0px; left: 16px; bottom: 0px;
864    width: 14px;
865}
866//! [112]
867
868
869//! [113]
870QFrame, QLabel, QToolTip {
871    border: 2px solid green;
872    border-radius: 4px;
873    padding: 2px;
874    background-image: url(images/welcome.png);
875}
876//! [113]
877
878
879//! [114]
880QGroupBox {
881    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
882                                      stop: 0 #E0E0E0, stop: 1 #FFFFFF);
883    border: 2px solid gray;
884    border-radius: 5px;
885    margin-top: 1ex; /* leave space at the top for the title */
886}
887
888QGroupBox::title {
889    subcontrol-origin: margin;
890    subcontrol-position: top center; /* position at the top center */
891    padding: 0 3px;
892    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
893                                      stop: 0 #FF0ECE, stop: 1 #FFFFFF);
894}
895//! [114]
896
897
898//! [115]
899QGroupBox::indicator {
900    width: 13px;
901    height: 13px;
902}
903
904QGroupBox::indicator:unchecked {
905    image: url(:/images/checkbox_unchecked.png);
906}
907
908/* proceed with styling just like QCheckBox */
909//! [115]
910
911
912//! [116]
913QHeaderView::section {
914    background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
915                                      stop:0 #616161, stop: 0.5 #505050,
916                                      stop: 0.6 #434343, stop:1 #656565);
917    color: white;
918    padding-left: 4px;
919    border: 1px solid #6c6c6c;
920}
921
922QHeaderView::section:checked
923{
924    background-color: red;
925}
926
927/* style the sort indicator */
928QHeaderView::down-arrow {
929    image: url(down_arrow.png);
930}
931
932QHeaderView::up-arrow {
933    image: url(up_arrow.png);
934}
935//! [116]
936
937
938//! [117]
939QLineEdit {
940    border: 2px solid gray;
941    border-radius: 10px;
942    padding: 0 8px;
943    background: yellow;
944    selection-background-color: darkgray;
945}
946//! [117]
947
948
949//! [118]
950QLineEdit[echoMode="2"] {
951    lineedit-password-character: 9679;
952}
953//! [118]
954
955
956//! [119]
957QLineEdit:read-only {
958    background: lightblue;
959}
960//! [119]
961
962
963//! [120]
964QListView {
965    alternate-background-color: yellow;
966}
967//! [120]
968
969
970//! [121]
971QListView {
972    show-decoration-selected: 1; /* make the selection span the entire width of the view */
973}
974
975QListView::item:alternate {
976    background: #EEEEEE;
977}
978
979QListView::item:selected {
980    border: 1px solid #6a6ea9;
981}
982
983QListView::item:selected:!active {
984    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
985                                stop: 0 #ABAFE5, stop: 1 #8588B2);
986}
987
988QListView::item:selected:active {
989    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
990                                stop: 0 #6a6ea9, stop: 1 #888dd9);
991}
992
993QListView::item:hover {
994    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
995                                stop: 0 #FAFBFE, stop: 1 #DCDEF1);
996}
997//! [121]
998
999
1000//! [122]
1001QMainWindow::separator {
1002    background: yellow;
1003    width: 10px; /* when vertical */
1004    height: 10px; /* when horizontal */
1005}
1006
1007QMainWindow::separator:hover {
1008    background: red;
1009}
1010//! [122]
1011
1012
1013//! [123]
1014QMenu {
1015    background-color: #ABABAB; /* sets background of the menu */
1016    border: 1px solid black;
1017}
1018
1019QMenu::item {
1020    /* sets background of menu item. set this to something non-transparent
1021        if you want menu color and menu item color to be different */
1022    background-color: transparent;
1023}
1024
1025QMenu::item:selected { /* when user selects item using mouse or keyboard */
1026    background-color: #654321;
1027}
1028//! [123]
1029
1030
1031//! [124]
1032QMenu {
1033    background-color: white;
1034    margin: 2px; /* some spacing around the menu */
1035}
1036
1037QMenu::item {
1038    padding: 2px 25px 2px 20px;
1039    border: 1px solid transparent; /* reserve space for selection border */
1040}
1041
1042QMenu::item:selected {
1043    border-color: darkblue;
1044    background: rgba(100, 100, 100, 150);
1045}
1046
1047QMenu::icon:checked { /* appearance of a 'checked' icon */
1048    background: gray;
1049    border: 1px inset gray;
1050    position: absolute;
1051    top: 1px;
1052    right: 1px;
1053    bottom: 1px;
1054    left: 1px;
1055}
1056
1057QMenu::separator {
1058    height: 2px;
1059    background: lightblue;
1060    margin-left: 10px;
1061    margin-right: 5px;
1062}
1063
1064QMenu::indicator {
1065    width: 13px;
1066    height: 13px;
1067}
1068
1069/* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
1070QMenu::indicator:non-exclusive:unchecked {
1071    image: url(:/images/checkbox_unchecked.png);
1072}
1073
1074QMenu::indicator:non-exclusive:unchecked:selected {
1075    image: url(:/images/checkbox_unchecked_hover.png);
1076}
1077
1078QMenu::indicator:non-exclusive:checked {
1079    image: url(:/images/checkbox_checked.png);
1080}
1081
1082QMenu::indicator:non-exclusive:checked:selected {
1083    image: url(:/images/checkbox_checked_hover.png);
1084}
1085
1086/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
1087QMenu::indicator:exclusive:unchecked {
1088    image: url(:/images/radiobutton_unchecked.png);
1089}
1090
1091QMenu::indicator:exclusive:unchecked:selected {
1092    image: url(:/images/radiobutton_unchecked_hover.png);
1093}
1094
1095QMenu::indicator:exclusive:checked {
1096    image: url(:/images/radiobutton_checked.png);
1097}
1098
1099QMenu::indicator:exclusive:checked:selected {
1100    image: url(:/images/radiobutton_checked_hover.png);
1101}
1102
1103//! [124]
1104
1105
1106//! [125]
1107QMenuBar {
1108    background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
1109                                      stop:0 lightgray, stop:1 darkgray);
1110    spacing: 3px; /* spacing between menu bar items */
1111}
1112
1113QMenuBar::item {
1114    padding: 1px 4px;
1115    background: transparent;
1116    border-radius: 4px;
1117}
1118
1119QMenuBar::item:selected { /* when selected using mouse or keyboard */
1120    background: #a8a8a8;
1121}
1122
1123QMenuBar::item:pressed {
1124    background: #888888;
1125}
1126//! [125]
1127
1128
1129//! [126]
1130QProgressBar {
1131    border: 2px solid grey;
1132    border-radius: 5px;
1133}
1134
1135QProgressBar::chunk {
1136    background-color: #05B8CC;
1137    width: 20px;
1138}
1139//! [126]
1140
1141
1142//! [127]
1143QProgressBar {
1144    border: 2px solid grey;
1145    border-radius: 5px;
1146    text-align: center;
1147}
1148//! [127]
1149
1150
1151//! [128]
1152QProgressBar::chunk {
1153    background-color: #CD96CD;
1154    width: 10px;
1155    margin: 0.5px;
1156}
1157//! [128]
1158
1159
1160//! [129]
1161QPushButton {
1162    border: 2px solid #8f8f91;
1163    border-radius: 6px;
1164    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1165                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
1166    min-width: 80px;
1167}
1168
1169QPushButton:pressed {
1170    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1171                                      stop: 0 #dadbde, stop: 1 #f6f7fa);
1172}
1173
1174QPushButton:flat {
1175    border: none; /* no border for a flat push button */
1176}
1177
1178QPushButton:default {
1179    border-color: navy; /* make the default button prominent */
1180}
1181//! [129]
1182
1183
1184//! [130]
1185QPushButton:open { /* when the button has its menu open */
1186    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1187                                      stop: 0 #dadbde, stop: 1 #f6f7fa);
1188}
1189
1190QPushButton::menu-indicator {
1191    image: url(menu_indicator.png);
1192    subcontrol-origin: padding;
1193    subcontrol-position: bottom right;
1194}
1195
1196QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open {
1197    position: relative;
1198    top: 2px; left: 2px; /* shift the arrow by 2 px */
1199}
1200//! [130]
1201
1202
1203//! [131]
1204QRadioButton::indicator {
1205    width: 13px;
1206    height: 13px;
1207}
1208
1209QRadioButton::indicator::unchecked {
1210    image: url(:/images/radiobutton_unchecked.png);
1211}
1212
1213QRadioButton::indicator:unchecked:hover {
1214    image: url(:/images/radiobutton_unchecked_hover.png);
1215}
1216
1217QRadioButton::indicator:unchecked:pressed {
1218    image: url(:/images/radiobutton_unchecked_pressed.png);
1219}
1220
1221QRadioButton::indicator::checked {
1222    image: url(:/images/radiobutton_checked.png);
1223}
1224
1225QRadioButton::indicator:checked:hover {
1226    image: url(:/images/radiobutton_checked_hover.png);
1227}
1228
1229QRadioButton::indicator:checked:pressed {
1230    image: url(:/images/radiobutton_checked_pressed.png);
1231}
1232//! [131]
1233
1234
1235//! [132]
1236QScrollBar:horizontal {
1237    border: 2px solid grey;
1238    background: #32CC99;
1239    height: 15px;
1240    margin: 0px 20px 0 20px;
1241}
1242//! [132]
1243
1244
1245//! [133]
1246QScrollBar::handle:horizontal {
1247    background: white;
1248    min-width: 20px;
1249}
1250//! [133]
1251
1252
1253//! [134]
1254QScrollBar::add-line:horizontal {
1255    border: 2px solid grey;
1256    background: #32CC99;
1257    width: 20px;
1258    subcontrol-position: right;
1259    subcontrol-origin: margin;
1260}
1261
1262QScrollBar::sub-line:horizontal {
1263    border: 2px solid grey;
1264    background: #32CC99;
1265    width: 20px;
1266    subcontrol-position: left;
1267    subcontrol-origin: margin;
1268}
1269//! [134]
1270
1271
1272//! [135]
1273QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
1274    border: 2px solid grey;
1275    width: 3px;
1276    height: 3px;
1277    background: white;
1278}
1279
1280QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
1281    background: none;
1282}
1283//! [135]
1284
1285
1286//! [136]
1287QScrollBar:horizontal {
1288    border: 2px solid green;
1289    background: cyan;
1290    height: 15px;
1291    margin: 0px 40px 0 0px;
1292}
1293
1294QScrollBar::handle:horizontal {
1295    background: gray;
1296    min-width: 20px;
1297}
1298
1299QScrollBar::add-line:horizontal {
1300    background: blue;
1301    width: 16px;
1302    subcontrol-position: right;
1303    subcontrol-origin: margin;
1304    border: 2px solid black;
1305}
1306
1307QScrollBar::sub-line:horizontal {
1308    background: magenta;
1309    width: 16px;
1310    subcontrol-position: top right;
1311    subcontrol-origin: margin;
1312    border: 2px solid black;
1313    position: absolute;
1314    right: 20px;
1315}
1316
1317QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
1318    width: 3px;
1319    height: 3px;
1320    background: pink;
1321}
1322
1323QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
1324    background: none;
1325}
1326
1327//! [136]
1328
1329
1330//! [137]
1331 QScrollBar:vertical {
1332     border: 2px solid grey;
1333     background: #32CC99;
1334     width: 15px;
1335     margin: 22px 0 22px 0;
1336 }
1337 QScrollBar::handle:vertical {
1338     background: white;
1339     min-height: 20px;
1340 }
1341 QScrollBar::add-line:vertical {
1342     border: 2px solid grey;
1343     background: #32CC99;
1344     height: 20px;
1345     subcontrol-position: bottom;
1346     subcontrol-origin: margin;
1347 }
1348
1349 QScrollBar::sub-line:vertical {
1350     border: 2px solid grey;
1351     background: #32CC99;
1352     height: 20px;
1353     subcontrol-position: top;
1354     subcontrol-origin: margin;
1355 }
1356 QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
1357     border: 2px solid grey;
1358     width: 3px;
1359     height: 3px;
1360     background: white;
1361 }
1362
1363 QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
1364     background: none;
1365 }
1366//! [137]
1367
1368
1369//! [138]
1370QSizeGrip {
1371    image: url(:/images/sizegrip.png);
1372    width: 16px;
1373    height: 16px;
1374}
1375//! [138]
1376
1377
1378//! [139]
1379QSlider::groove:horizontal {
1380    border: 1px solid #999999;
1381    height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
1382    background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4);
1383    margin: 2px 0;
1384}
1385
1386QSlider::handle:horizontal {
1387    background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
1388    border: 1px solid #5c5c5c;
1389    width: 18px;
1390    margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
1391    border-radius: 3px;
1392}
1393//! [139]
1394
1395
1396//! [140]
1397QSlider::groove:vertical {
1398    background: red;
1399    position: absolute; /* absolutely position 4px from the left and right of the widget. setting margins on the widget should work too... */
1400    left: 4px; right: 4px;
1401}
1402
1403QSlider::handle:vertical {
1404    height: 10px;
1405    background: green;
1406    margin: 0 -4px; /* expand outside the groove */
1407}
1408
1409QSlider::add-page:vertical {
1410    background: white;
1411}
1412
1413QSlider::sub-page:vertical {
1414    background: pink;
1415}
1416//! [140]
1417
1418
1419//! [141]
1420QSpinBox {
1421    padding-right: 15px; /* make room for the arrows */
1422    border-image: url(:/images/frame.png) 4;
1423    border-width: 3;
1424}
1425
1426QSpinBox::up-button {
1427    subcontrol-origin: border;
1428    subcontrol-position: top right; /* position at the top right corner */
1429
1430    width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
1431    border-image: url(:/images/spinup.png) 1;
1432    border-width: 1px;
1433}
1434
1435QSpinBox::up-button:hover {
1436    border-image: url(:/images/spinup_hover.png) 1;
1437}
1438
1439QSpinBox::up-button:pressed {
1440    border-image: url(:/images/spinup_pressed.png) 1;
1441}
1442
1443QSpinBox::up-arrow {
1444    image: url(:/images/up_arrow.png);
1445    width: 7px;
1446    height: 7px;
1447}
1448
1449QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off { /* off state when value is max */
1450   image: url(:/images/up_arrow_disabled.png);
1451}
1452
1453QSpinBox::down-button {
1454    subcontrol-origin: border;
1455    subcontrol-position: bottom right; /* position at bottom right corner */
1456
1457    width: 16px;
1458    border-image: url(:/images/spindown.png) 1;
1459    border-width: 1px;
1460    border-top-width: 0;
1461}
1462
1463QSpinBox::down-button:hover {
1464    border-image: url(:/images/spindown_hover.png) 1;
1465}
1466
1467QSpinBox::down-button:pressed {
1468    border-image: url(:/images/spindown_pressed.png) 1;
1469}
1470
1471QSpinBox::down-arrow {
1472    image: url(:/images/down_arrow.png);
1473    width: 7px;
1474    height: 7px;
1475}
1476
1477QSpinBox::down-arrow:disabled,
1478QSpinBox::down-arrow:off { /* off state when value in min */
1479   image: url(:/images/down_arrow_disabled.png);
1480}
1481
1482//! [141]
1483
1484
1485//! [142]
1486QSplitter::handle {
1487    image: url(images/splitter.png);
1488}
1489
1490QSplitter::handle:horizontal {
1491    width: 2px;
1492}
1493
1494QSplitter::handle:vertical {
1495    height: 2px;
1496}
1497
1498QSplitter::handle:pressed {
1499    url(images/splitter_pressed.png);
1500}
1501
1502//! [142]
1503
1504
1505//! [143]
1506QStatusBar {
1507    background: brown;
1508}
1509
1510QStatusBar::item {
1511    border: 1px solid red;
1512    border-radius: 3px;
1513}
1514//! [143]
1515
1516
1517//! [144]
1518QStatusBar QLabel {
1519    border: 3px solid white;
1520}
1521//! [144]
1522
1523
1524//! [145]
1525QTabWidget::pane { /* The tab widget frame */
1526    border-top: 2px solid #C2C7CB;
1527}
1528
1529QTabWidget::tab-bar {
1530    left: 5px; /* move to the right by 5px */
1531}
1532
1533/* Style the tab using the tab sub-control. Note that
1534    it reads QTabBar _not_ QTabWidget */
1535QTabBar::tab {
1536    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1537                                stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
1538                                stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
1539    border: 2px solid #C4C4C3;
1540    border-bottom-color: #C2C7CB; /* same as the pane color */
1541    border-top-left-radius: 4px;
1542    border-top-right-radius: 4px;
1543    min-width: 8ex;
1544    padding: 2px;
1545}
1546
1547QTabBar::tab:selected, QTabBar::tab:hover {
1548    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1549                                stop: 0 #fafafa, stop: 0.4 #f4f4f4,
1550                                stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
1551}
1552
1553QTabBar::tab:selected {
1554    border-color: #9B9B9B;
1555    border-bottom-color: #C2C7CB; /* same as pane color */
1556}
1557
1558QTabBar::tab:!selected {
1559    margin-top: 2px; /* make non-selected tabs look smaller */
1560}
1561//! [145]
1562
1563
1564//! [146]
1565QTabWidget::pane { /* The tab widget frame */
1566    border-top: 2px solid #C2C7CB;
1567}
1568
1569QTabWidget::tab-bar {
1570    left: 5px; /* move to the right by 5px */
1571}
1572
1573/* Style the tab using the tab sub-control. Note that
1574    it reads QTabBar _not_ QTabWidget */
1575QTabBar::tab {
1576    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1577                                stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
1578                                stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
1579    border: 2px solid #C4C4C3;
1580    border-bottom-color: #C2C7CB; /* same as the pane color */
1581    border-top-left-radius: 4px;
1582    border-top-right-radius: 4px;
1583    min-width: 8ex;
1584    padding: 2px;
1585}
1586
1587QTabBar::tab:selected, QTabBar::tab:hover {
1588    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1589                                stop: 0 #fafafa, stop: 0.4 #f4f4f4,
1590                                stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
1591}
1592
1593QTabBar::tab:selected {
1594    border-color: #9B9B9B;
1595    border-bottom-color: #C2C7CB; /* same as pane color */
1596}
1597
1598QTabBar::tab:!selected {
1599    margin-top: 2px; /* make non-selected tabs look smaller */
1600}
1601
1602/* make use of negative margins for overlapping tabs */
1603QTabBar::tab:selected {
1604    /* expand/overlap to the left and right by 4px */
1605    margin-left: -4px;
1606    margin-right: -4px;
1607}
1608
1609QTabBar::tab:first:selected {
1610    margin-left: 0; /* the first selected tab has nothing to overlap with on the left */
1611}
1612
1613QTabBar::tab:last:selected {
1614    margin-right: 0; /* the last selected tab has nothing to overlap with on the right */
1615}
1616
1617QTabBar::tab:only-one {
1618    margin: 0; /* if there is only one tab, we don't want overlapping margins */
1619}
1620//! [146]
1621
1622
1623//! [147]
1624QTabWidget::pane { /* The tab widget frame */
1625    border-top: 2px solid #C2C7CB;
1626    position: absolute;
1627    top: -0.5em;
1628}
1629
1630QTabWidget::tab-bar {
1631    alignment: center;
1632}
1633
1634/* Style the tab using the tab sub-control. Note that
1635    it reads QTabBar _not_ QTabWidget */
1636QTabBar::tab {
1637    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1638                                stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
1639                                stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
1640    border: 2px solid #C4C4C3;
1641    border-bottom-color: #C2C7CB; /* same as the pane color */
1642    border-top-left-radius: 4px;
1643    border-top-right-radius: 4px;
1644    min-width: 8ex;
1645    padding: 2px;
1646}
1647
1648QTabBar::tab:selected, QTabBar::tab:hover {
1649    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1650                                stop: 0 #fafafa, stop: 0.4 #f4f4f4,
1651                                stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
1652}
1653
1654QTabBar::tab:selected {
1655    border-color: #9B9B9B;
1656    border-bottom-color: #C2C7CB; /* same as pane color */
1657}
1658//! [147]
1659
1660
1661//! [148]
1662QTabBar::tear {
1663    image: url(tear_indicator.png);
1664}
1665
1666QTabBar::scroller { /* the width of the scroll buttons */
1667    width: 20px;
1668}
1669
1670QTabBar QToolButton { /* the scroll buttons are tool buttons */
1671    border-image: url(scrollbutton.png) 2;
1672    border-width: 2px;
1673}
1674
1675QTabBar QToolButton::right-arrow { /* the arrow mark in the tool buttons */
1676    image: url(rightarrow.png);
1677}
1678
1679QTabBar QToolButton::left-arrow {
1680    image: url(leftarrow.png);
1681}
1682//! [148]
1683
1684
1685//! [149]
1686QTableView {
1687    selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,
1688                                stop: 0 #FF92BB, stop: 1 white);
1689}
1690//! [149]
1691
1692
1693//! [150]
1694QTableView QTableCornerButton::section {
1695    background: red;
1696    border: 2px outset red;
1697}
1698//! [150]
1699
1700
1701//! [151]
1702QToolBar {
1703    background: red;
1704    spacing: 3px; /* spacing between items in the tool bar */
1705}
1706
1707QToolBar::handle {
1708    image: url(handle.png);
1709}
1710//! [151]
1711
1712
1713//! [152]
1714QToolBox::tab {
1715    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1716                                stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
1717                                stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
1718    border-radius: 5px;
1719    color: darkgray;
1720}
1721
1722QToolBox::tab:selected { /* italicize selected tabs */
1723    font: italic;
1724    color: white;
1725}
1726//! [152]
1727
1728
1729//! [153]
1730QToolButton { /* all types of tool button */
1731    border: 2px solid #8f8f91;
1732    border-radius: 6px;
1733    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1734                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
1735}
1736
1737QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
1738    padding-right: 20px; /* make way for the popup button */
1739}
1740
1741QToolButton:pressed {
1742    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
1743                                      stop: 0 #dadbde, stop: 1 #f6f7fa);
1744}
1745
1746/* the subcontrols below are used only in the MenuButtonPopup mode */
1747QToolButton::menu-button {
1748    border: 2px solid gray;
1749    border-top-right-radius: 6px;
1750    border-bottom-right-radius: 6px;
1751    /* 16px width + 4px for border = 20px allocated above */
1752    width: 16px;
1753}
1754
1755QToolButton::menu-arrow {
1756    image: url(downarrow.png);
1757}
1758
1759QToolButton::menu-arrow:open {
1760    top: 1px; left: 1px; /* shift it a bit */
1761}
1762//! [153]
1763
1764
1765//! [154]
1766QToolTip {
1767    border: 2px solid darkkhaki;
1768    padding: 5px;
1769    border-radius: 3px;
1770    opacity: 200;
1771}
1772//! [154]
1773
1774
1775//! [155]
1776QTreeView {
1777    alternate-background-color: yellow;
1778}
1779//! [155]
1780
1781
1782//! [156]
1783QTreeView {
1784    show-decoration-selected: 1;
1785}
1786
1787QTreeView::item {
1788     border: 1px solid #d9d9d9;
1789    border-top-color: transparent;
1790    border-bottom-color: transparent;
1791}
1792
1793QTreeView::item:hover {
1794    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);
1795    border: 1px solid #bfcde4;
1796}
1797
1798QTreeView::item:selected {
1799    border: 1px solid #567dbc;
1800}
1801
1802QTreeView::item:selected:active{
1803    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
1804}
1805
1806QTreeView::item:selected:!active {
1807    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6b9be8, stop: 1 #577fbf);
1808}
1809//! [156]
1810
1811
1812//! [157]
1813QTreeView::branch {
1814        background: palette(base);
1815}
1816
1817QTreeView::branch:has-siblings:!adjoins-item {
1818        background: cyan;
1819}
1820
1821QTreeView::branch:has-siblings:adjoins-item {
1822        background: red;
1823}
1824
1825QTreeView::branch:!has-children:!has-siblings:adjoins-item {
1826        background: blue;
1827}
1828
1829QTreeView::branch:closed:has-children:has-siblings {
1830        background: pink;
1831}
1832
1833QTreeView::branch:has-children:!has-siblings:closed {
1834        background: gray;
1835}
1836
1837QTreeView::branch:open:has-children:has-siblings {
1838        background: magenta;
1839}
1840
1841QTreeView::branch:open:has-children:!has-siblings {
1842        background: green;
1843}
1844
1845//! [157]
1846
1847
1848//! [158]
1849QTreeView::branch:has-siblings:!adjoins-item {
1850    border-image: url(vline.png) 0;
1851}
1852
1853QTreeView::branch:has-siblings:adjoins-item {
1854    border-image: url(branch-more.png) 0;
1855}
1856
1857QTreeView::branch:!has-children:!has-siblings:adjoins-item {
1858    border-image: url(branch-end.png) 0;
1859}
1860
1861QTreeView::branch:has-children:!has-siblings:closed,
1862QTreeView::branch:closed:has-children:has-siblings {
1863        border-image: none;
1864        image: url(branch-closed.png);
1865}
1866
1867QTreeView::branch:open:has-children:!has-siblings,
1868QTreeView::branch:open:has-children:has-siblings  {
1869        border-image: none;
1870        image: url(branch-open.png);
1871}
1872//! [158]
1873
1874//! [159]
1875QTabBar::close-button {
1876    image: url(close.png)
1877    subcontrol-position: left;
1878}
1879QTabBar::close-button:hover {
1880    image: url(close-hover.png)
1881}
1882
1883//! [159]
1884
1885//! [160]
1886* { lineedit-password-mask-delay: 1000 }
1887//! [160]
1888
1889//! [161]
1890QTableView::indicator:unchecked {
1891    background-color: #d7d6d5
1892}
1893//! [161]
1894
1895//! [162]
1896* { widget-animation-duration: 100 }
1897//! [162]
1898
1899