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

QML Text letterSpacing not working on raspberry pi 3 (EGLFS)



  • Hello everyone,
    I'm developing a gui app using QML - cpp for raspberry pi 3. Environment is :

    • Raspbian 9 (debian)
    • Qt 5.11 (build options below)
    • EGLFS

    I'm now trying to increase letterSpacing in title, without success. Here is a sample example :

    import QtQuick 2.9
    import QtQuick.Window 2.11
    
    Window {
        id: screen
        visible: true
        width: 320; height: 480
        color: "black"
    
        Item {
            id: container
            x: screen.width / 2; y: screen.height / 2
    
            Text {
                id: text
                anchors.centerIn: parent
                color: "white"
                text: "Hello world!"
                font.pixelSize: 48
                font.letterSpacing: 40
                font.bold: true
    
            }
        }
    }
    

    I can change font.bold, font.pixelSize, the text actually changes. But changing letterSpacing does nothing.
    I looked for similar issues on forums, but didn't find anything.... :/

    Anybody faced the same issue or see what I'm doing wrong ? Thank you very much !

    Here's my Qt build options :

    Build options:
      Mode ................................... release (with debug info); optimized tools
      Optimize release build for size ........ no
      Building shared libraries .............. yes
      Using C++ standard ..................... C++1z
      Using ccache ........................... no
      Using gold linker ...................... no
      Using new DTAGS ........................ yes
      Generating GDB index ................... no
      Using precompiled headers .............. yes
      Using LTCG ............................. no
      Target compiler supports:
        NEON ................................. yes
      Build parts ............................ libs
    Qt modules and options:
      Qt Concurrent .......................... yes
      Qt D-Bus ............................... yes
      Qt D-Bus directly linked to libdbus .... yes
      Qt Gui ................................. yes
      Qt Network ............................. yes
      Qt Sql ................................. yes
      Qt Testlib ............................. yes
      Qt Widgets ............................. yes
      Qt Xml ................................. yes
    Support enabled for:
      Using pkg-config ....................... yes
      udev ................................... yes
      Using system zlib ...................... yes
    Qt Core:
      DoubleConversion ....................... yes
        Using system DoubleConversion ........ yes
      GLib ................................... yes
      iconv .................................. no
      ICU .................................... yes
      Tracing backend ........................ <none>
      Logging backends:
        journald ............................. no
        syslog ............................... no
        slog2 ................................ no
      Using system PCRE2 ..................... no
    Qt Network:
      getifaddrs() ........................... yes
      IPv6 ifname ............................ yes
      libproxy ............................... no
      Linux AF_NETLINK ....................... yes
      OpenSSL ................................ yes
        Qt directly linked to OpenSSL ........ no
      OpenSSL 1.1 ............................ no
      SCTP ................................... no
      Use system proxies ..................... yes
    Qt Gui:
      Accessibility .......................... yes
      FreeType ............................... yes
        Using system FreeType ................ yes
      HarfBuzz ............................... no
        Using system HarfBuzz ................ no
      Fontconfig ............................. yes
      Image formats:
        GIF .................................. yes
        ICO .................................. yes
        JPEG ................................. yes
          Using system libjpeg ............... yes
        PNG .................................. yes
          Using system libpng ................ yes
      EGL .................................... yes
      OpenVG ................................. no
      OpenGL:
        Desktop OpenGL ....................... no
        OpenGL ES 2.0 ........................ yes
        OpenGL ES 3.0 ........................ yes
        OpenGL ES 3.1 ........................ yes
        OpenGL ES 3.2 ........................ yes
      Vulkan ................................. no
      Session Management ..................... yes
    Features used by QPA backends:
      evdev .................................. yes
      libinput ............................... yes
      INTEGRITY HID .......................... no
      mtdev .................................. yes
      tslib .................................. yes
      xkbcommon-evdev ........................ yes
    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. yes
      EGLFS details:
        EGLFS OpenWFD ........................ no
        EGLFS i.Mx6 .......................... no
        EGLFS i.Mx6 Wayland .................. no
        EGLFS RCAR ........................... no
        EGLFS EGLDevice ...................... yes
        EGLFS GBM ............................ yes
        EGLFS VSP2 ........................... no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... no
        EGL on X11 ........................... yes
      LinuxFB ................................ yes
      VNC .................................... yes
      Mir client ............................. no
      X11:
        Using system-provided XCB libraries .. yes
        EGL on X11 ........................... yes
        Xinput2 .............................. yes
        XCB XKB .............................. yes
        XLib ................................. yes
        XCB render ........................... yes
        XCB GLX .............................. yes
        XCB Xlib ............................. yes
        Using system-provided xkbcommon ...... no
        Native painting (experimental) ....... yes
    Qt Widgets:
      GTK+ ................................... no
      Styles ................................. Fusion Windows
    Qt PrintSupport:
      CUPS ................................... yes
    Qt Sql:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. yes
      OCI (Oracle) ........................... no
      ODBC ................................... yes
      PostgreSQL ............................. yes
      SQLite2 ................................ yes
      SQLite ................................. yes
        Using system provided SQLite ......... no
      TDS (Sybase) ........................... yes
    Qt Testlib:
      Tester for item models ................. yes
    Qt SerialBus:
      Socket CAN ............................. yes
      Socket CAN FD .......................... yes
    QtXmlPatterns:
      XML schema support ..................... yes
    Qt QML:
      QML network support .................... yes
      QML debugging and profiling support .... no
      QML delegate model ..................... yes
    Qt Quick:
      Direct3D 12 ............................ no
      AnimatedImage item ..................... yes
      Canvas item ............................ yes
      Support for Qt Quick Designer .......... yes
      Flipable item .......................... yes
      GridView item .......................... yes
      ListView item .......................... yes
      Path support ........................... yes
      PathView item .......................... yes
      Positioner items ....................... yes
      Repeater item .......................... yes
      ShaderEffect item ...................... yes
      Sprite item ............................ yes
    Qt Gamepad:
      SDL2 ................................... no
    Qt 3D:
      Assimp ................................. yes
      System Assimp .......................... no
      Output Qt3D Job traces ................. no
      Output Qt3D GL traces .................. no
      Use SSE2 instructions .................. no
      Use AVX2 instructions .................. no
      Aspects:
        Render aspect ........................ yes
        Input aspect ......................... yes
        Logic aspect ......................... yes
        Animation aspect ..................... yes
        Extras aspect ........................ yes
    Qt 3D Renderers:
      OpenGL Renderer ........................ yes
    Qt 3D GeometryLoaders:
      Autodesk FBX ........................... no
    Qt Bluetooth:
      BlueZ .................................. no
      BlueZ Low Energy ....................... no
      Linux Crypto API ....................... no
      WinRT Bluetooth API (desktop & UWP) .... no
    Qt Sensors:
      sensorfw ............................... no
    Qt Quick Controls 2:
      Styles ................................. Default Fusion Imagine Material Universal
    Qt Quick Templates 2:
      Hover support .......................... yes
      Multi-touch support .................... yes
    Qt Positioning:
      Gypsy GPS Daemon ....................... no
      WinRT Geolocation API .................. no
    Qt Location:
      Qt.labs.location experimental QML plugin . yes
      Geoservice plugins:
        OpenStreetMap ........................ yes
        HERE ................................. yes
        Esri ................................. yes
        Mapbox ............................... yes
        MapboxGL ............................. yes
        Itemsoverlay ......................... yes
    Qt Multimedia:
      ALSA ................................... yes
      GStreamer 1.0 .......................... yes
      GStreamer 0.10 ......................... no
      Video for Linux ........................ yes
      OpenAL ................................. no
      PulseAudio ............................. no
      Resource Policy (libresourceqt5) ....... no
      Windows Audio Services ................. no
      DirectShow ............................. no
      Windows Media Foundation ............... no
    Qt WebEngine:
      Embedded build ......................... yes
      Pepper Plugins ......................... no
      Printing and PDF ....................... no
      Proprietary Codecs ..................... no
      Spellchecker ........................... yes
      Native Spellchecker .................... no
      WebRTC ................................. no
      Use System Ninja ....................... no
      Geolocation ............................ yes
      Use v8 snapshot ........................ yes
      Building v8 snapshot supported ......... no
      Use ALSA ............................... yes
      Use PulseAudio ......................... yes
      Optional system libraries used:
        re2 .................................. no
        icu .................................. no
        libwebp, libwebpmux and libwebpdemux . no
        opus ................................. no
        ffmpeg ............................... no
        libvpx ............................... no
        snappy ............................... no
        libsrtp .............................. no
        glib ................................. yes
        zlib ................................. yes
        minizip .............................. no
        libevent ............................. no
        jsoncpp .............................. no
        protobuf ............................. no
        libxml2 and libxslt .................. no
        lcms2 ................................ no
        png .................................. yes
        JPEG ................................. yes
        harfbuzz ............................. no
      Required system libraries:
        fontconfig ........................... yes
        dbus ................................. yes
        nss .................................. no
        khr .................................. yes
        glibc ................................ yes
      Required system libraries for qpa-xcb:
        libdrm ............................... yes
        xcomposite ........................... no
        xcursor .............................. no
        xi ................................... no
        xrandr ............................... no
        xtst ................................. no
    

    Etienne



  • @etiennedm said in QML Text letterSpacing not working on raspberry pi 3 (EGLFS):

    EGLFS Raspberry Pi ................... no
    

    Have you checked this option?



  • Thank you Pablo for your answer.
    I did check this option. In the qmake.conf I used (in qtbase/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf), it is said to check that

    "EGLFS GBM .......... yes"
    

    is present, otherwise eglfs will not be functional.
    I don't know the difference, I don't know if that causes the letterSpacing no to work. Do you know what tests are run to success the option

    EGLFS Raspberry Pi ................... yes/no
    

    Thank you !



  • Anybody facing the same issue or seeing what could have done wrong ?
    Thank you !

    Ps : the wordSpacing option is working well



  • Ok. I "found" the issue.
    After recompiling Qt with different versions / compilers, I found that was... my USB Mouse !
    I have always tested with a USB mouse plugged in the raspi. Removing it before launching the program fixes the issue.
    Does someone have any idea why ?
    It seems to conflict with I don't know which library, but if someone has a clue, I'm very interested in !
    Thank you !

    Etienne

    PS : I let the thread opened for a few days, in case someone can help on the reason of this issue


Log in to reply