# draw the load percentage text p.setPen(Qt.black) p.setBrush(Qbrush(Qt.black)) p.drawText(0,0, self.width(), self.height(), Qt.AlignCenter, str(val) + "%")