I expect this code should work but it doesn't
QTextCursor cursor = textEdit->textCursor();
cursor = QTextCursor(cursor.currentFrame());
cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
textEdit->setTextCursor(cursor);
textEdit->copy(); // Here I got only text from current cell, not a table