1 /* //from http://thesmithfam.org/blog/2010/03/10/fancy-qslider-stylesheet/ */ 2 3 QSlider::groove:horizontal { 4 border: 1px solid #bbb; 5 background: white; 6 height: 10px; 7 border-radius: 4px; 8 } 9 10 QSlider::sub-page:horizontal { 11 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 12 stop: 0 #66e, stop: 1 #bbf); 13 background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1, 14 stop: 0 #bbf, stop: 1 #55f); 15 border: 1px solid #777; 16 height: 10px; 17 border-radius: 4px; 18 } 19 20 QSlider::add-page:horizontal { 21 background: #fff; 22 border: 1px solid #777; 23 height: 10px; 24 border-radius: 4px; 25 } 26 27 QSlider::handle:horizontal { 28 background: qlineargradient(x1:0, y1:0, x2:1, y2:1, 29 stop:0 #eee, stop:1 #ccc); 30 border: 1px solid #777; 31 width: 13px; 32 margin-top: -2px; 33 margin-bottom: -2px; 34 border-radius: 4px; 35 } 36 37 QSlider::handle:horizontal:hover { 38 background: qlineargradient(x1:0, y1:0, x2:1, y2:1, 39 stop:0 #fff, stop:1 #ddd); 40 border: 1px solid #444; 41 border-radius: 4px; 42 } 43 44 QSlider::sub-page:horizontal:disabled { 45 background: #bbb; 46 border-color: #999; 47 } 48 49 QSlider::add-page:horizontal:disabled { 50 background: #eee; 51 border-color: #999; 52 } 53 54 QSlider::handle:horizontal:disabled { 55 background: #eee; 56 border: 1px solid #aaa; 57 border-radius: 4px; 58 } 59