设置信号槽
connect(ui.lineEdit, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(slot_tooltip(int,int)));
[signal] void QLineEdit::cursorPositionChanged(int oldPos, int newPos)
This signal is emitted whenever the cursor moves. The previous position is given by oldPos, and the new position by newPos.
See also setCursorPosition() and cursorPosition().