@@ -0,0 +1,929 @@
+from PyQt5.QtWidgets import QOpenGLWidget%0Afrom PyQt5.QtCore import Qt%0Afrom PyQt5.QtGui import QPainter, QBrush%0A%0Aclass FlashingBox(QOpenGLWidget):%0A%0A  def __init__(self, parent, freq, color):%0A    super(FlashingBox, self).__init__(parent)%0A    self.freq = freq%0A    self.brushes = %5BQBrush(Qt.black), QBrush(color)%5D%0A    self.index = 0%0A    self.enabled = False%0A%0A  def timerEvent(self, event):%0A    if self.enabled:%0A        self.index = (self.index + 1) %25 2%0A    else:%0A        self.index = 0%0A    self.update()%0A%0A  def paintEvent(self, event):%0A    painter = QPainter(self)%0A    painter.fillRect(event.rect(), self.brushes%5Bself.index%5D)%0A  %0A  def suspendFlashing(self):%0A    self.killTimer(self._timer)%0A    self.enabled=False%0A    self.index = 0%0A    self.update()%0A  %0A  def startFlashing(self):%0A    self.index = 0%0A    self.enabled = True%0A    delay = int(1000/(2 * self.freq))  #in mSec%0A    self._timer = self.startTimer(delay, Qt.PreciseTimer)%0A%0A%0A %0A

Add FlashingBox component