示例#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))
示例#2
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))
示例#3
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))
示例#4
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))