Domanda

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!

È stato utile?

Soluzione

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!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top