PDA

View Full Version : QTextEdit / QTextBlockFormat : bug?



mkdotcom
8th April 2012, 12:16
Hello

It seems that a big bug is there (tested on Qt 4.8.0 and Qt 4.8.1)

here is code to test:



QTextEdit *editor = new QTextEdit();
QTextCursor cursor(editor->textCursor());
QTextBlockFormat blockFormat = cursor.blockFormat();
blockFormat.setLeftMargin(150);
cursor.setBlockFormat(blockFormat);
for (int i=0; i<100; i++) cursor.insertText("aaa aaaa ");



The cursor can't go on the right part of the text (150 pixels from the right side of the textedit), using arrow keys or mouse gives the same result.
Or maybe I did something wrong?

Thanks for your help, i'm 100% stuck with this...


Thanks

mkdotcom
17th April 2012, 15:14
is anyone can take some little time to check this? it seems a major bug...
thanks

Added after 1 59 minutes:

i've built my project with Qt 4.7.4, the bug is not there
it's only in 4.8 it seems