Custom QSlider without handler, rounded corner lost when values next to MIN or MAX



  • Hi,

    I have an horizontal custom QSlider without handler, and rounded corners.
    My problem is when I set slider value to the minimum or the maximum (+-1px), and external corner is NOT rounded anymore...

    It seems to happen when the slider value gets round radius, I hope I am explaining myself...

    The stylesheet code is:
    @
    QSlider::groove:horizontal {
    border: 1px solid #999999;
    height: 8px;
    margin: 2px 0;
    border-radius: 5px;
    }

    QSlider::handle:horizontal {
    width: 0px;
    border: 0px ;
    margin-right: 0px;
    border-radius: 0px;
    }

    QSlider::add-page:qlineargradient {
    background: white;
    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: red;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    }@

    Thanks in advance,

    Diego

    !d:\qslider.png(qslider image)!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.