• 4684阅读
  • 8回复

进度条中间的进度那个颜色如何控制? [复制链接]

上一主题 下一主题
离线eggking
 
只看楼主 倒序阅读 楼主  发表于: 2008-11-09
— 本帖被 XChinux 执行加亮操作(2009-01-06) —
放到不同的平台不一样,请问下
怎么把那个颜色固定成在windows下的风格
在板子上跑起来是深蓝色,不好看,想弄成绿色。。。郁闷
谢谢啦。。。。。着急啊。。。
铁甲依然在!
离线lazybone
只看该作者 1楼 发表于: 2008-11-10
QProgressBar {
    border: 2px solid grey;
    border-radius: 5px;
}

QProgressBar::chunk {
    background-color: #05B8CC;
    width: 20px;
}
This leaves the text-align, which we customize by positioning the text in the center of the progress bar.
QProgressBar {
    border: 2px solid grey;
    border-radius: 5px;
    text-align: center;
}
A margin can be included to obtain more visible chunks.

In the screenshot above, we use a margin of 0.5 pixels.
QProgressBar::chunk {
    background-color: #CD96CD;
    width: 10px;
    margin: 0.5px;
}
--------------------------
自己试试
离线eggking
只看该作者 2楼 发表于: 2008-11-10
看着这东西,貌似css
姐姐。。。你该认识俺吧,俺用的qt2.。。。貌似不支持这东西
铁甲依然在!
离线netlove

只看该作者 3楼 发表于: 2008-11-10
我也用QT2,感觉好多东西论坛上说的,QT2里都找不到
离线eggking
只看该作者 4楼 发表于: 2008-11-10
自己慢慢摸。。。
铁甲依然在!
离线netlove

只看该作者 5楼 发表于: 2008-11-10
一起触摸一下,我还没用过这个呢
离线eggking
只看该作者 6楼 发表于: 2008-11-10
摸着爽不爽?
铁甲依然在!
离线netlove

只看该作者 7楼 发表于: 2008-11-10
呵呵,我写错了,是琢磨一下,正在试
离线eggking
只看该作者 8楼 发表于: 2008-11-10
哦。。。。原来这样哦。。。
铁甲依然在!
快速回复
限100 字节
 
上一个 下一个