Priority: P2: Important
Affects Version/s: 5.2.0
Fix Version/s: 5.3.1
Component/s: GUI: Font handling
Environment:Windows 7 QT 5.2.0 ("correct")
Android 4.3 QT 5.2.0 ("wrong")
I have a textEdit as part of a layout in my QMainWindow.
I call the following (extracted, minimized example, real lines are longer, no real data in example):
ui->textEdit->setHtml("<PRE>\n00 00000000\n00 1111----\n ----1111\n</PRE>\n");
I assumed to get ("correct")
(all lines end at same position, looks correct, at least on my system, here in bug tracker).
But I get ("wrong", not real amount of characters, but it looks like this)
00 1111-- (each '-' is smaller, not fixed size)
1111 (each space and '' is smaller, not fixed size)
It is correctly displayed on Windows, but wrong on Android (Nexus 7 (2012)).
It looks like implementation on Android does not use fixed size font.
I already tried additionally to set font of textEdit, e.g. by
ui->textEdit->setStyleSheet("font: 9pt \"Courier\";");
It sometimes changes font or font size, but never looked to be a fixed size font on Android.
I get the complete output as string from a big (already existing) subroutine,
so it would be no solution to use something like a HTML table for each character,
at least I think this is no acceptable solution to do this.
I also tried <TT> or <CODE> without success.
Any other idea?