def shape(self): path = QPainterPath() w = self._width + 2 r = QRectF(0, 0, 600 + w, 50 + w) r.translate(-w / 2, -w / 2) path.addRect(r) return path
def shape(self): path = QPainterPath() path.addRect(QRectF(0, 0, 600, 50)) rect = QRectF(0, 0, 10, 10) rect.translate(-10, 20) path.addRect(rect) return path