Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.1
-
None
Description
QTextFrameFormat frameFormat; frameFormat.setHeight(400); frameFormat.setBorder(2.0); frameFormat.setBorderBrush(Qt::black); QTextFrame* frame = cursor.insertFrame(frameFormat); QTextBlockFormat blockFormat; blockFormat.setAlignment(Qt::AlignCenter); // doesn't work cursor.setBlockFormat(blockFormat); QTextCharFormat charFormat; charFormat.setFontPointSize(30); cursor.insertText("text", charFormat);
The text alignment inside the block doesn't seem to work correctly. The text is centered horizontally, but remains on the top of the block instead of vertical center