I need know how to change cursor for the next 2 line , after the table to put my checkbox. Do you know how?
fmtTable.setCellSpacing(0);
fmtTable.setBorder(1);
format.
setFontWeight(QFont::Bold);
fonte.setFamily("Calibri");
fonte.setBold(true);
fonte.setPointSize(12);
cursor.mergeCharFormat(format);
cursor.insertText("1. Identificação\n\n");
format.setFont(fonte);
QTextTable *table
=cursor.
insertTable(1,
2,fmtTable
);
table->cellAt(0, 0).firstCursorPosition().insertText("Nome : ");
table->cellAt(0, 1).firstCursorPosition().insertText("Helder Lobato");
cursor.insertText("\n\n1. Identificação\n\n");
QTextDocument *document = ui->textEdit->document();
QTextCursor cursor(document);
cursor.movePosition(QTextCursor::Start);
cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
QTextCharFormat format;
QTextTableFormat fmtTable;
fmtTable.setCellSpacing(0);
fmtTable.setBorder(1);
format.setFontWeight(QFont::Bold);
QFont fonte;
fonte.setFamily("Calibri");
fonte.setBold(true);
fonte.setPointSize(12);
cursor.mergeCharFormat(format);
cursor.insertText("1. Identificação\n\n");
format.setFont(fonte);
QTextTable *table =cursor.insertTable(1,2,fmtTable);
table->cellAt(0, 0).firstCursorPosition().insertText("Nome : ");
table->cellAt(0, 1).firstCursorPosition().insertText("Helder Lobato");
cursor.insertText("\n\n1. Identificação\n\n");
To copy to clipboard, switch view to plain text mode
Bookmarks