Work around for Qt bug. On Linux computers, the `QPainter painter`
instantiation must follow QSlider::paintEvent(paintEvent)