PDA

View Full Version : How to detect scroll on QtextEdit



tonnot
4th October 2011, 20:16
I dont know how to connect or use the scrollbar events for a QtextEdit.
By now I use at paintevent this:

((QAbstractScrollArea*)txt_editor)->verticalScrollBar()->value()<<"";
QTextCursor first_clock = txt_editor->cursorForPosition(QPoint(0,0));

Is there any other way ? Am I doing something strange ?
Thanks

wysota
10th October 2011, 21:15
What do you want to do? You don't have to cast in line #1, that's for sure.