[SOLVED] Non-Latin Unicode Strings Not Showing



  • I have a QPushButton (same problem for all widgets) that I set the text to a Japanese (or any other Non-Latin unicode) string and the button is blank.

    I have tried directly setting the text, using codecs, and directly entering the hex value with no luck. If I try a European or Latin based string, the the text shows without any problem. I have checked and I do have the fonts for the Non-Latin strings on my PC and the characters show up correctly every single time regardless of what string I use when outputting to the console via qDebug().

    Does anyone know how to solve this problem?

    I am on Ubuntu 10.04 and am using Qt 4.7.1

    UPDATE: Apparently Qt is not able to find the fonts on my machine and insists on using its own. Creating a symbolic link to a font that supports Japanese characters in the "[QtDir]/lib/fonts" folder solved the problem.

    I am using QVFb, perhaps this has something to do with it.



  • [quote author="rufus359" date="1308781208"]UPDATE: Apparently Qt is not able to find the fonts on my machine and insists on using its own. Creating a symbolic link to a font that supports Japanese characters in the "[QtDir]/lib/fonts" folder solved the problem.[/quote]

    Cheers for the update, and welcome to the devnet :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.