PDA

View Full Version : QtextCursor



bismitapadhy
24th June 2009, 10:43
i want to return beginning of the selected text cursor in terms of QtextCursor.

or

Select text of a document keeping the cursor at the beginning of the selected text.

wysota
24th June 2009, 13:09
You can have more than one cursor - so you can have one pointing at the beginning of the selected text and another pointing elsewhere. See QTextCursor::movePosition() to learn how to move the cursor to the interesting spot. There is also QTextCursor::selectionStart() and family that you might find useful.