문제

I I have an editable QWebView, and would like to get the position (QPoint) of TextCursor. I searched but could only find the position of the cursor (mouse pointer) webview-> cursor.pos (); and this position is not what I want.

Anyone have any suggestions?

Thank you!

도움이 되었습니까?

해결책

Resolved, to catch the QPoint TextCursor in editable QWebView is used:

webview->page ()->inputMethodQuery(Qt::ImMicroFocus).toRect ().center()

(for example: center() )

Thanks to those who helped me!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top