Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Some characters are disappear in Qlabel



  • In my qt window application, some characters are disappear in Qlabel.
    If I setText ("abcdefgh") QLable is displayed as "a cd g ".
    0_1511351153435_question.PNG

    QLabel label;
    QString css_text = "QLabel{font-size:14px; background-color: rgba(64, 64, 64, 20%); font-family:Malgun Gothic; color:white;}";
    label.setStyleSheet(css_text);
    label.setText("abcdefgh");
    

    Also,

    • Changing the font from "Malgun Gothic" to "Malgun Gothic Semilight", problems not happened.
    • Changing the font-size from "14px" to "13px", problems not happened.
    • This problem only occurs on machines using nvidia vga.

    What could be the problem and what's the solution ?

    {Qt 5.7.0, Win10}


  • Lifetime Qt Champion

    Hi
    It could be a font issue.
    Can an other application use that font and same text with no issue?



  • @mrjj
    Hi,
    This problem only occurs with widgets registered as QGraphicsProxyWidget item of QGraphicsScene.
    Also, changing the font-size from "14px" to "13px", problems disappeared.
    Thank you.



  • @artrace it looks like your problem is solved, isn't it? If so please don't forget to mark your post as such. Thanks.


Log in to reply