Enabling a ticks for QSlider seems to mess up the sizeHint of the slider itself.
Consider this simple code:
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSlider ds{Qt::Horizontal};
ds.setRange(0, 100);
ds.setTickPosition(QSlider::TicksAbove);
ds.setTickInterval(20);
ds.show();
return a.exec();
}
and this is how is rendered:
notice how the slider is cropped below.
this behaviour is the same in a complex widget too of course:
Resizing the window of the first slider tick position does not follow the slider itself.
So the question is how have a QSlider rendered properly with ticks enabled?