Exemplo n.º 1
0
 def paintEvent(self, event):
     """Override Qt method"""
     painter = QPainter(self)
     painter.setRenderHint(QPainter.Antialiasing)
     # Decoration
     painter.fillPath(self.path_current, QBrush(self.color))
     painter.strokePath(self.path_decoration,
                        QPen(self.color_decoration, self.stroke_decoration))
Exemplo n.º 2
0
    def paintEvent(self, event):
        """ """
        self.build_paths()

        painter = QPainter(self)
        painter.setRenderHint(QPainter.Antialiasing)

        painter.fillPath(self.round_rect_path, self.color_back)
        painter.fillPath(self.top_rect_path, self.color_top)
        painter.strokePath(self.round_rect_path, QPen(Qt.gray, 1))