sometime lack string (QtEmbedded Qt4.5, linux)
Hello.
When I display string by using QLabel, missing string sometime occur.
My environment is embedded(mips & Linux), and I use additional true type font.
I do not understand a cause.
Code:
title1->setText("ABCDE");
title1->setGeometry(100, 100, 100, 30);
title1
->setFont
(QFont("myFontFamilyName",
18));
title2->setText("VWXYZ");
title2->setGeometry(100, 200, 100, 30);
title2
->setFont
(QFont("myFontFamilyName",
18));
The code result have 4 cases.
case 1(about 10%):
BCDE on title1 label and WXYZ on title2 label.
case 2(about 30%):
ABCDE on title1 label and WXYZ on title2 label.
case 3(about 30%):
BCDE on title1 label and VWXYZ on title2 label.
case 4(about 30%):this is success case.
ABCDE on title1 label and VWXYZ on title2 label.
I hope that this code result always is case 4(success).
Do you know a cause of this problem?
Thanks.
Re: sometime lack string (QtEmbedded Qt4.5, linux)
What happens if you put it in a layout rather than setting a fixed geometry yourself?
Re: sometime lack string (QtEmbedded Qt4.5, linux)
Hi, fatjuicymole.
Thank you for your response.
The cause of this problem is font familyname.
My two font files are ...
1. they have the same familyname.
2. one of my font files has only number(0 - 9).
3. the other has only alphabet(a-z, A-Z).
Maybe, Qt(or freetype) confuse.
I bond these fonts together, I get 100% success case.