The QTextCursor class also maintains information about any text it has selected in the document, again following a model that is conceptually similar to the actions made by the user to select text in an editor. The use of a cursor-oriented interface for editing makes the process of writing a custom editor simpler for developers, since the editing operations can be easily visualized. As a result, information about the document structure is also available through the cursor, and this allows the structure to be modified. The cursor is used to perform editing operations that correspond exactly to those the user is able to make themselves in an editor. Documents can be edited via the interface provided by the QTextCursor class cursors are either created using a constructor or obtained from an editor widget.
0 Comments
Leave a Reply. |