PDA

View Full Version : QTextEdit: Copy Table Under The Cursor to Another QTextEdit



Green360
24th April 2014, 09:54
My solution for copying block:


QTextCursor cursor = textEdit1->textCursor();
cursor.select(QTextCursor::BlockUnderCursor);
textEdit1->copy();
textEdit2->paste();

But looks like selected text is not placed in clipboard when textEdit1->copy() occurs.
Because the next call pastes old clipboard content to textEdit2.

How to fix the problem? More general question - how to copy QTextFrame or QTextTable from one QTextDocument instance to another?