QSlider Customize bug?
-
hi,
i want to use border-radius
Below is the result my custom slider
In the second picture, the border-radius does not apply.
The radius disappear when moved the bar to the right.
below is my code
QSlider::groove:horizontal {
border: 1px solid #262626;
height: 7px;
border-radius:4px;
}QSlider::handle:horizontal {
width: 15px;
height: 30px;
margin: -10px -7px;
border-image: url(:/icons/icons/notification/svg/production/ic_priority_high_24px.svg);
border-radius:4px;
}QSlider::add-page:horizontal {
border-radius: 4px;
background: gray;
}QSlider::sub-page:horizontal {
border-radius:4px;
background: red;
}is this qt bug?
why is this?
-
QSlider::add-page:horizontal {
border-radius: 4px;
background: gray;
margin: 0.5px;
}QSlider::sub-page:horizontal {
border-radius: 4px;
background: red;
margin: 0.5px;
}When I apply this, the radius problem disappears but the border is visible on add,sub page.
-
i solve this problem..
Some options have been changed and solved.
but I still don't know why this is happening.
below is my code
.QSlider {
min-height: 34px;
max-height: 34px;
}.QSlider::groove:horizontal {
border: 1px solid #262626;
height: 8px;
background: #393939;
margin: 0px 1px;
border-radius:5px;
}.QSlider::handle:horizontal {
background:transparent;
border: 1px solid red;
width: 15px;
height: 100px;
margin: -12px -6px;
border-radius:5px;
border-image: url(:/icons/icons/av/svg/production/ic_stop_24px.svg);
}QSlider::add-page:qlineargradient {
background: lightgrey;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}QSlider::sub-page:qlineargradient {
background: blue;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}result
-
i solve this problem..
Some options have been changed and solved.
but I still don't know why this is happening.
below is my code
.QSlider {
min-height: 34px;
max-height: 34px;
}.QSlider::groove:horizontal {
border: 1px solid #262626;
height: 8px;
background: #393939;
margin: 0px 1px;
border-radius:5px;
}.QSlider::handle:horizontal {
background:transparent;
border: 1px solid red;
width: 15px;
height: 100px;
margin: -12px -6px;
border-radius:5px;
border-image: url(:/icons/icons/av/svg/production/ic_stop_24px.svg);
}QSlider::add-page:qlineargradient {
background: lightgrey;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}QSlider::sub-page:qlineargradient {
background: blue;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}result