def __init__(self, parent=None):
super(BubblesWidget, self).__init__(parent)
self.pen = QPen(QColor("#cccccc"))
self.bubbles = []
self.backgroundColor1 = self.randomColor()
self.backgroundColor2 = self.randomColor().darker(150)
self.newBubble = None
random.seed()
self.animation_timer = QTimer(self)
self.animation_timer.setSingleShot(False)
self.animation_timer.timeout.connect(self.animate)
self.animation_timer.start(25)
self.bubbleTimer = QTimer()
self.bubbleTimer.setSingleShot(False)
self.bubbleTimer.timeout.connect(self.expandBubble)
self.setMouseTracking(True)
self.setMinimumSize(QSize(200, 200))
self.setWindowTitle("Bubble Maker")
评论列表
文章目录