Deleting a QTextFrame in a QTextDocument
I can successfully insert blocks and frames in a QTextDocument. I see no way to delete any of those frames and/or blocks.
QTextEdit::cut() deletes selected text from a QTextEdit. (doesn't seem to work for me either) but according to the documentation, not from the document (?).
Can I delete a frame and any containing blocks from a document. If so, how?
Appreciate any help,
Enno
Re: Deleting a QTextFrame in a QTextDocument
Calling delete on the QTextFrame pointer will destroy the frame and remove it from the QTextDocument it belongs to. You can get the currentFrame() from a suitably positioned QTextCursor (this may be the rootFrame()). AFAICT, QTextBlocks will be removed automatically when you remove the frame containing them or QTextCursor::removeSelectedText().
Re: Deleting a QTextFrame in a QTextDocument
hey please tell me how to insert block/frames in qtextdocument.
Re: Deleting a QTextFrame in a QTextDocument