コード例 #1
0
    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))
コード例 #2
0
ファイル: qt_occ_viewer.py プロジェクト: hixio-mh/declaracad
 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()