[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.
!http://i.stack.imgur.com/hNOXs.png(Qt app with blank Russian)!
I tried qtconfig. It works, font changes, but no Russian letters appeared
Configuration:
@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@/etc/lsb-release:
@DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17
DISTRIB_CODENAME=qiana
DISTRIB_DESCRIPTION="Linux Mint 17 Qiana"@Qt: 4.8.6
.qmake.cache:
@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!
-
Hi,
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
http://www.qtcentre.org/threads/35653-QT-4-7-looks-ugly-on-GNOME!?p=165121#post165121
said I need rebuild Qt with -fontconfig option. Also I installed other recommended Qt for X11 requirements:
http://qt-project.org/doc/qt-4.8/requirements-x11.htmlFirst ./configure attempt reported a problem
@QTextCodec: using KOI8-R, probe failed (e0 ce ru)@
and this topic http://unixforum.org/index.php?showtopic=23586&view=findpost&p=232032 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-devlocaledef --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 -fontconfigmake
sudo make install@
-
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.