Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Text and emojies in QML
Forum Updated to NodeBB v4.3 + New Features

Text and emojies in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmltextemijiunicode
4 Posts 2 Posters 621 Views
  • 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.
  • T Offline
    T Offline
    The Qt Mayssa
    wrote on 23 May 2024, 12:55 last edited by
    #1

    Hello ,
    I'm running an application that displays texts with emojies on Raspberry PI and linux.
    here's the output i get .

    Capture d'écran 2024-05-22 100143.png

    Elements that could help for diagnostic : works fine on windows but not linux.
    in my console i have the emojies displayed on all the platforms.
    I think it's unicode problem. i tried to convert the text to hex unicode then display it in console it works fine ... i think the system can do the conversoin but not qml code on linux.

    Example of unicode :
    6424fb5d-27eb-41e0-897a-6c78682ee473-image.png
    What could be the reason and how to fix this ?
    Thank you

    Here's the qml example code :

        Rectangle {
            anchors.fill:parent
            color:"yellow"
            Column {
                spacing: 10
                anchors.centerIn: parent
    
                Text {
                    text: "💡😉😜 🙂📺⚠️ À regarder sur votre télévision "
                    font.pointSize: 24
                    textFormat: Text.RichText
                }
    
                TextEdit {
                    text: "💡😉😜 🙂📺⚠️ À regarder sur votre télévision "
                    font.pointSize: 24
                    readOnly: true
                    textFormat: Text.RichText
                }
            }
    
        }```
    1 Reply Last reply
    0
    • T Offline
      T Offline
      The Qt Mayssa
      wrote on 23 May 2024, 13:15 last edited by
      #2

      https://forum.qt.io/user/sierdzio
      @sierdzio this should be better.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 23 May 2024, 13:46 last edited by
        #3

        install a font family that supports those icons and set the font.familiy of your qml elements to the new family

        https://doc.qt.io/qt-6/qml-qtquick-text.html#font.family-prop


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        T 1 Reply Last reply 23 May 2024, 13:53
        1
        • J J.Hilk
          23 May 2024, 13:46

          install a font family that supports those icons and set the font.familiy of your qml elements to the new family

          https://doc.qt.io/qt-6/qml-qtquick-text.html#font.family-prop

          T Offline
          T Offline
          The Qt Mayssa
          wrote on 23 May 2024, 13:53 last edited by The Qt Mayssa
          #4

          @J-Hilk i did ... i checked the font used on windows by default with the console.log(text.font) and forced on linux to used it but was'nt better :/

          1 Reply Last reply
          0

          1/4

          23 May 2024, 12:55

          • Login

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