Same size of every Symbol QString
-
wrote on 9 Aug 2018, 16:07 last edited by
-
How can i make all symbols in my QString being same size? Because some(like 'i' or '0' are thiner then others).
Here is the problem in screenshot below(each memory adress string have 10 element-length):
wrote on 9 Aug 2018, 16:22 last edited by@Engelard said in Same size of every Symbol QString:
How can i make all symbols in my QString being same size?
Use a fixed-size font ...
-
How can i make all symbols in my QString being same size? Because some(like 'i' or '0' are thiner then others).
Here is the problem in screenshot below(each memory adress string have 10 element-length):
wrote on 9 Aug 2018, 16:25 last edited byUse setFont and use a Courier font for instance.
Otherwayis with a stylesheet -
@Engelard said in Same size of every Symbol QString:
How can i make all symbols in my QString being same size?
Use a fixed-size font ...
wrote on 9 Aug 2018, 16:51 last edited by Engelard 8 Sept 2018, 16:53@Pablo-J.-Rogina said in Same size of every Symbol QString:
@Engelard said in Same size of every Symbol QString:
How can i make all symbols in my QString being same size?
Use a fixed-size font ...
I can't find no "fixed-size" in google, all i found is function which applied to QFont object
QFont fnt; fnt.setPointSize(10);
But it only change size of font, all string now bigger, and the length of the all that strings with 10 symbols are still different.
I wish i could use that something like this:
myItem->setFont(QFont::italic());
-
wrote on 9 Aug 2018, 16:57 last edited by
QFont font=QFontDatabase::systemFont(QFontDatabase::FixedFont);
-
wrote on 9 Aug 2018, 17:02 last edited by
@mpergand said in Same size of every Symbol QString:
QFont font=QFontDatabase::systemFont(QFontDatabase::FixedFont);
Such a perfect answer. God bless you.
4/6