Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] No cyrillic letters in Qt 4.8.6 / Linux Mint

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

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ilyasivkov
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ilyasivkov
        wrote on last edited by
        #3

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

        First ./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-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

        make

        sudo make install@

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Strange, AFAIK, fontconfig should be enabled by default…

          So you did got it working ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • I Offline
            I Offline
            ilyasivkov
            wrote on last edited by
            #5

            Yes, with fontconfig all works fine!

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pixraider
              wrote on last edited by
              #6

              What the doctor ordered. Thanks, man.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved