'Create a call tip manager that is attached to the specified Qt
text edit widget.'

def __init__(self, text_edit, hide_timer_on=False):

    assert isinstance(text_edit, (QTextEdit, QPlainTextEdit))
    super(CallTipWidget, self).__init__(None, Qt.ToolTip)
    self.app = QCoreApplication.instance()
    self.hide_timer_on = hide_timer_on
    self.tip = None
    self._hide_timer = QBasicTimer()
    self._text_edit = text_edit
    self.setFont(text_edit.document().defaultFont())
    self.setForegroundRole(QPalette.ToolTipText)
    self.setBackgroundRole(QPalette.ToolTipBase)
    self.setPalette(QToolTip.palette())
    self.setAlignment(Qt.AlignLeft)
    self.setIndent(1)
    self.setFrameStyle(QFrame.NoFrame)
    self.setMargin((1 + self.style().pixelMetric(QStyle.PM_ToolTipLabelFrameWidth, None, self)))
