def paintEvent(self, event): self.proxy.ais_context.UpdateCurrentViewer() # important to allow overpainting of the OCC OpenGL context in Qt if self._drawbox: painter = QPainter(self) painter.setPen(self._select_pen) painter.drawRect(QRect(*self._drawbox))
def drawBox(self): if self._drawbox: self.makeCurrent() painter = QPainter(self) painter.setPen(self._select_pen) painter.drawRect(QRect(*self._drawbox)) painter.end() self.doneCurrent()