code: def paintEvent(self, event):
          
          # use the base technique for the dialog mode
          if self.currentMode() == XPopupWidget.Mode.Dialog:
              super(XPopupWidget, self).paintEvent(event)
              return
          
          # setup the coloring options
          palette = self.palette()
          
          with XPainter(self) as painter:
              pen = QPen(palette.color(palette.Window).darker(130))
              pen.setWidthF(1.75)
              painter.setPen(pen)
              painter.setRenderHint(painter.Antialiasing)
              painter.setBrush(palette.color(palette.Window))
              painter.drawPath(self.borderPath())
docs: Overloads the paint event to handle painting pointers for the popup \
          mode.
          
          :param      event | <QPaintEvent>