This "works" but the indent is unacceptably hugeQt Code:
QTextBlockFormat aux; aux.setIndent(1); cu.insertBlock(); cu.mergeBlockFormat(aux); cu.insertText("blah blah blah");To copy to clipboard, switch view to plain text modeEven if the setIndent() argument is the smallest possible (the call has an int argument). Setting bigger indents shifts the text out of the editor window soon. Can someone more experienced verify it and evaluate, whether it is really a bug?
Note that other similar calls (setting margins, setTextIndent() ) have qreal arguments and behave much better. Replacing setIndent() by setLeftMargin() fixes the problem - but I wanted the text indented, not the block displaced.
Bookmarks