I dont know how to connect or use the scrollbar events for a QtextEdit.
By now I use at paintevent this:
Qt Code:
  1. ((QAbstractScrollArea*)txt_editor)->verticalScrollBar()->value()<<"";
  2. QTextCursor first_clock = txt_editor->cursorForPosition(QPoint(0,0));
To copy to clipboard, switch view to plain text mode 
Is there any other way ? Am I doing something strange ?
Thanks