qt - How can I know the absolute position of the text input cursor in a QTextEdit? -
QTextEdit is apparently a text concert () method that gives a QTextCursor, but it has a cursor to modify the document
I do not see any way to get the actual full (or widget relative) widget of the blinking cursor in GUI. How can I retrieve this information? In QTextEdit there is a method called cursor (), in which the position of the position of the QRect cursor is displayed. .
QRect QTextEdit :: cursorRect (const QTextCursor and cursor) const
returns a rectangle (in the viewport coordinate) Includes
QRect QTextEdit :: cursorRect () const
Returns a rectangle (in the viewport coordinates), which includes the text editing cursor.QRect coordinates will be able to provide
Comments
Post a Comment