Quote Originally Posted by llev View Post
Try the following:
Qt Code:
  1. // m_Edit - QTextEdit object
  2. // ptViewport - mouse position in viewport coordinates
  3. // docLPos - position of character under mouse
  4. int docLPos = m_Edit->document()->documentLayout()->hitTest( QPointF( ptViewport.x(), ptViewport.y() ), Qt::ExactHit );
To copy to clipboard, switch view to plain text mode 
While having the same pb, i tried your solution and it works like a charm thanks