Important: Please read the Qt Code of Conduct -

[SOLVED] No cyrillic letters in Qt 4.8.6 / Linux Mint

  • Hi,

    I can't read or write any Russian text in a program written on Qt. All labels on Russian are blank, typing Cyrillic letters in QLineEdit has no effect.

    Note all other programs works with Russian fine, even Qt Creator itself. In form design mode all labels are OK, but they disappear when I run a program.

    Also Qt Linguist doesn't show Russian text

    Image below shows a test program: Second line label contains Russian text, and QLineEdit at end too.

    ! app with blank Russian)!

    I tried qtconfig. It works, font changes, but no Russian letters appeared


    @cat /proc/version
    Linux version 3.13.0-24-generic (buildd@batsu) (gcc version 4.8.2 (Ubuntu
    4.8.2-19ubuntu1) ) #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014@

    DISTRIB_DESCRIPTION="Linux Mint 17 Qiana"@

    Qt: 4.8.6

    @CONFIG += debug largefile stl precompile_header mmx 3dnow sse sse2
    sse3 ssse3 sse4_1 sse4_2 avx dylib create_prl link_prl depend_includepath
    fix_output_dirs QTDIR_build@

    Thanks for all!

  • Lifetime Qt Champion


    Did you try setting a cyrillic font on your line edit ?

  • Hi,

    I added QFontDialog and found that Qt has only ten ugly raster fonts, with Bitstream Character as default. This topic!?p=165121#post165121
    said I need rebuild Qt with -fontconfig option. Also I installed other recommended Qt for X11 requirements:

    First ./configure attempt reported a problem

    @QTextCodec: using KOI8-R, probe failed (e0 ce ru)@

    and this topic helped me:

    @$ localedef --no-archive -c -f KOI8-R -i ru_RU ru_RU.KOI8-R@

    My final script to build is:

    @sudo apt-get install libfontconfig1-dev libfreetype6-dev
    libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev
    libxi-dev libxrandr-dev libxrender-dev

    localedef --no-archive -c -f KOI8-R -i ru_RU ru_RU.KOI8-R

    ./configure -debug -opensource -shared -qt-sql-psql -nomake demos
    -nomake examples -gtkstyle -xrender -xrandr -xcursor -xfixes -fontconfig


    sudo make install@

  • Lifetime Qt Champion

    Strange, AFAIK, fontconfig should be enabled by default…

    So you did got it working ?

  • Yes, with fontconfig all works fine!

  • What the doctor ordered. Thanks, man.

Log in to reply