Yea, great! This is my code for scanning the blocks on a mouse move event:

Qt Code:
  1. for(QTextBlock block = document()->begin(); block.isValid(); block = block.next()) {
  2. if(block.contains(textpos)) {
  3. int posinblock = textpos - block.position();
  4. if(block.layout()->isValidCursorPosition(posinblock)) {
  5. QTextLine tl = block.layout()->lineForTextPosition(posinblock);
  6. int linestartpos = block.position() + tl.textStart();
  7. emit onMouseMoveTextLineStartPos(linestartpos);
  8. }
  9. break;
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 

Thanks for your help, patrik08!