c++ - Qt: How to set topMargin of paragraph in QTextEdit -
i trying set margin above first paragraph of qtextedit
. problem shows above second paragraph; between first , second paragraph.
my current code is:
auto doc = ui->textedit->document(); auto blockformat = doc->begin().blockformat(); blockformat.settopmargin(100); qtextcursor{doc->begin()}.setblockformat(blockformat);
is intended behavior of qt? how achieve desired outcome of having margin above every paragraph, including first?
this seems design. simple workaround insert empty paragraph, or paragraph transparent 1x1 image.
Comments
Post a Comment