PDA

View Full Version : Qslider Ticks not displayed



iaguirre
25th March 2010, 16:36
Hi,

I have an horizontal sliderwith a personilized stylesheet
but the Ticks are not displayed. This is the Stylesheet:
QSlider::groove:horizontal {
border: 1px solid #999999;
border-top-color:rgb(110,130,157);
height: 40px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:0.33 rgba(0, 0, 0, 255), stop:0.34 rgba(255, 30, 30, 255), stop:0.66 rgba(255, 0, 0, 255), stop:0.67 rgba(255, 255, 0, 255), stop:1 rgba(255, 255, 0, 255));
margin: 2px 0;
}

In the code i use this properties refered to the slider´s ticks:
m_ui->horizontalSlider->setTickInterval(4);
m_ui->horizontalSlider->setTickPosition(QSlider::TicksBothSides);

Can anyone help me?
Thanks,
I.A.

sheeeng
30th March 2010, 06:09
I think there's no stylesheet for tick position on QSlider. QTBUG-3564 (http://bugreports.qt.nokia.com/browse/QTBUG-3564)