Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How i get the position of textcursor in QWebView Editable

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!

like image 306
FelipeMac Avatar asked Oct 04 '22 05:10

FelipeMac


1 Answers

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!

like image 111
FelipeMac Avatar answered Oct 08 '22 17:10

FelipeMac