'Reimplement Qt method'

def mousePressEvent(self, event):

    if (sys.platform.startswith('linux') and (event.button() == Qt.MidButton)):
        self.calltip_widget.hide()
        self.setFocus()
        event = QMouseEvent(QEvent.MouseButtonPress, event.pos(), Qt.LeftButton, Qt.LeftButton, Qt.NoModifier)
        QPlainTextEdit.mousePressEvent(self, event)
        QPlainTextEdit.mouseReleaseEvent(self, event)
        mode_clip = QClipboard.Clipboard
        mode_sel = QClipboard.Selection
        text_clip = QApplication.clipboard().text(mode=mode_clip)
        text_sel = QApplication.clipboard().text(mode=mode_sel)
        QApplication.clipboard().setText(text_sel, mode=mode_clip)
        self.paste()
        QApplication.clipboard().setText(text_clip, mode=mode_clip)
    else:
        self.calltip_widget.hide()
        QPlainTextEdit.mousePressEvent(self, event)
