<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def paintEvent(self, event):
 """Paint the widget :param event: :type event: :returns: None :rtype: None :raises: None """

        if not self.toPlainText() and not self.hasFocus() and self._placeholder:
            p = QtGui.QPainter(self.viewport())
            p.setClipping(False)
            col = self.palette().text().color()
            col.setAlpha(128)
            oldpen = p.pen()
            p.setPen(col)
            p.drawText(self.viewport().geometry(), QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop, self._placeholder)
            p.setPen(oldpen)
        else:
            return super(JB_PlainTextEdit, self).paintEvent(event)