wxj120bw的个人主页

http://www.qtcn.org/bbs/u/65192  [收藏] [复制]

wxj120bw

  • 68

    关注

  • 69

    粉丝

  • 202

    访客

  • 等级:精灵王
  • 总积分:1654
  • 保密,1960-01-01

最后登录:2018-04-13

更多资料

日志

qt样式总结

2011-07-31 11:51
这是qt4.3推出的各个组件的样式说明
http://doc.qt.nokia.com/4.3/stylesheet-examples.html
在以上基础上,将推出各个更多的组件样式例子
http://thesmithfam.org/blog/2009/10/13/cool-qprogressbar-stylesheet/
这个暂且命名用QProgressBar呈现实验室里的试管
图片如下

代码如下
QProgressBar {
border: 1px solid black;
text-align: top;
padding: 1px;
border-bottom-right-radius: 7px;
border-bottom-left-radius: 7px;
background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 #fff,
stop: 0.4999 #eee,
stop: 0.5 #ddd,
stop: 1 #eee );
width: 15px;
}
QProgressBar::chunk {
background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 #78d,
stop: 0.4999 #46a,
stop: 0.5 #45a,
stop: 1 #238 );
border-bottom-right-radius: 7px;
border-bottom-left-radius: 7px;
border: 1px solid black;
}

http://labs.qt.nokia.com/2007/06/29/styling-qslider-qheaderview/
这里介绍了QSlider一种样式设置

QSlider::groove:vertical {
background: red;
position: absolute; /* absolutely position 4px from the left andright of the widget. setting margins on the widget should work too... */
left: 4px; right: 4px;
}
QSlider::handle:vertical {
height: 10px;
background: green;
margin: 0 -4px; /* expand outside the groove */
}
QSlider::add-page:vertical {
background: white;
}
QSlider::sub-page:vertical {
background: pink;
}

http://pastebin.com/igR6PrDT 有时间来整理


文章里的资源来源于网上,就不一一说出出处了。




分类:界面|回复:0|浏览:5427|全站可见|转载
 

下一篇: qml项目编译错误

上一篇:

Powered by phpwind v8.7 Certificate Copyright Time now is:03-28 22:19
©2005-2016 QTCN开发网 版权所有 Gzip disabled