I do this to increase the indent of a selection of lines in a plainTextEdit, but nothing happens:
QTextCursor cur
= plainEdit
->textCursor
();
// contains the selection tbf.setIndent(10); // change indent
cur.setBlockFormat(tbf); // put it all back
plainEdit->setTextCursor(cur);
QTextCursor cur = plainEdit->textCursor(); // contains the selection
QTextBlockFormat tbf = cur.blockFormat(); //selection format
tbf.setIndent(10); // change indent
cur.setBlockFormat(tbf); // put it all back
plainEdit->setTextCursor(cur);
To copy to clipboard, switch view to plain text mode
wordwrap is off so a block is a line. This doesn't work, somebody has some pointers? thanks
Bookmarks