Results 1 to 3 of 3

Thread: sometime lack string (QtEmbedded Qt4.5, linux)

  1. #1
    Join Date
    Sep 2009
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Unhappy 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.

    Qt Code:
    1. QLabel* title1 = new QLabel(this);
    2. title1->setText("ABCDE");
    3. title1->setGeometry(100, 100, 100, 30);
    4. title1->setFont(QFont("myFontFamilyName", 18));
    5.  
    6. QLabel* title2 = new QLabel(this);
    7. title2->setText("VWXYZ");
    8. title2->setGeometry(100, 200, 100, 30);
    9. title2->setFont(QFont("myFontFamilyName", 18));
    To copy to clipboard, switch view to plain text mode 

    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.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sometime lack string (QtEmbedded Qt4.5, linux)

    What happens if you put it in a layout rather than setting a fixed geometry yourself?

  3. #3
    Join Date
    Sep 2009
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default 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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.