code: def paintEvent(self, event):
          
          with XPainter(self) as painter:
              count   = self.maximum() - self.minimum()
              value   = self.value()
              
              w       = self.pixmapSize().width()
              h       = self.pixmapSize().height()
              x       = 2
              y       = (self.height() - h) / 2
              delta_x = (self.width() - 4 - (w * count - 1)) / (count - 1)
              
              full_pixmap  = self.fullPixmap().scaled(w, h)
              empty_pixmap = self.emptyPixmap().scaled(w, h)
              
              for i in range(count):
                  if ( i < value ):
                      painter.drawPixmap(x, y, full_pixmap)
                  else:
                      painter.drawPixmap(x, y, empty_pixmap)
                  
                  x += w + delta_x
docs: Paints the widget based on its values
          
          :param      event | <QPaintEvent>