关于border的渐变样式
这个类型的颜色边框要如何设置
QLineEdit{
border-width:5px;
border-style:solid ;
border-radius:1px;
border-top-color:
qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:0.5,
stop:0.0416667 rgba(74, 93, 109, 255),
stop:0.232143 rgba(74, 93, 109, 255),
stop:0.738095 rgba(83, 125, 166, 255)
);
border-left-color:
qlineargradient(spread:reflect, x1:0.509, y1:0.5, x2:0.945, y2:0.5,
stop:0.142268 rgba(83, 142, 166, 255),
stop:0.376906 rgba(83, 125, 166, 255),
stop:0.851528 rgba(66, 80, 94, 255));
border-right-color:
qlineargradient(spread:reflect, x1:0.509, y1:0.5, x2:0.945, y2:0.5,
stop:0.142268 rgba(83, 142, 166, 255),
stop:0.376906 rgba(83, 125, 166, 255),
stop:0.851528 rgba(66, 80, 94, 255));
border-bottom-color:
qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:0.5,
stop:0.0416667 rgba(74, 93, 109, 255),
stop:0.232143 rgba(74, 93, 109, 255),
stop:0.738095 rgba(83, 125, 166, 255))
;
}
这个是我目前的样式,但是边框的四个角不能完美结合,求大神帮忙看看。
...全文
请发表友善的回复…
发表回复
laisina 2016-04-14
- 打赏
- 举报
在Designer设置stylesheet
just59277 2016-04-13
- 打赏
- 举报
颜色不用我设置,到时候有人会调 ,我只要把边框渐变的效果体现出来。我现在发现是那个圆角的问题,不要圆角的话,看上去还是一个整体,但是没圆角看上去不太好。
firerun 2016-04-12
- 打赏
- 举报
楼主不要纠结了,你想的方法实现不了。还是在外边做成图然后加载上去把。
但是呢?做的图最好和控件大小一样的分辨率,不然还是很丑的。
东莞某某某 2016-04-12
- 打赏
- 举报
使用border-image:
https://www.w3.org/TR/css3-background/#the-border-image