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. Some numericals missing when i'm changing Qml Label text dynamically.
Forum Update on Monday, May 27th 2025

Some numericals missing when i'm changing Qml Label text dynamically.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 6 Posters 1.4k 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.
  • S Offline
    S Offline
    sharath
    wrote on last edited by sharath
    #1

    some numerical are missing while i'm changing the qml label text dynamically like for example, there is 15 when i change it to 15 to 16, there i'm missing 6 from 16 i.e 1 is visible 6 is invisible. i'm using Label Qml type to display.
    Label
    {
    id: Label1
    anchors.fill: parent
    renderType: Text.NativeRendering
    text:"25"
    color: "#61d72d"
    font.family: "Roboto"
    font.weight: "Medium"
    font.pixelSize: 86
    width: parent.width/2
    verticalAlignment: Text.AlignVCenter
    horizontalAlignment: Text.AlignHCenter
    }
    This missing numbers happens only on embedded not on desktop. This is strange problem im facing. Any help on the subject would be greatly appreciated

    Thanks

    J.HilkJ 1 Reply Last reply
    0
    • D Offline
      D Offline
      DavidM29
      wrote on last edited by
      #2

      Are you sure that your Label width is wide enough ? Some number are a little bit larger than other.
      (It is just a suggestion I don't know what else could cause this problem)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sharath
        wrote on last edited by sharath
        #3

        @DavidM29 yes its wide enough..there is no problem with that..i have cross verified width height and all,mostly there will be problem with the rendering

        JonBJ 1 Reply Last reply
        0
        • S sharath

          @DavidM29 yes its wide enough..there is no problem with that..i have cross verified width height and all,mostly there will be problem with the rendering

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @sharath
          Have you tried for yourself removing some of the various properties (font, alignment, etc.) so that you can narrow down the problem to ask?

          S 1 Reply Last reply
          0
          • JonBJ JonB

            @sharath
            Have you tried for yourself removing some of the various properties (font, alignment, etc.) so that you can narrow down the problem to ask?

            S Offline
            S Offline
            sharath
            wrote on last edited by
            #5

            @JonB Yes i have tried with that also.

            JonBJ 1 Reply Last reply
            0
            • S sharath

              @JonB Yes i have tried with that also.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @sharath
              So for example is the choice of Roboto font or pixelSize germane or irrelevant?

              S 1 Reply Last reply
              0
              • S sharath

                some numerical are missing while i'm changing the qml label text dynamically like for example, there is 15 when i change it to 15 to 16, there i'm missing 6 from 16 i.e 1 is visible 6 is invisible. i'm using Label Qml type to display.
                Label
                {
                id: Label1
                anchors.fill: parent
                renderType: Text.NativeRendering
                text:"25"
                color: "#61d72d"
                font.family: "Roboto"
                font.weight: "Medium"
                font.pixelSize: 86
                width: parent.width/2
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignHCenter
                }
                This missing numbers happens only on embedded not on desktop. This is strange problem im facing. Any help on the subject would be greatly appreciated

                Thanks

                J.HilkJ Online
                J.HilkJ Online
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @sharath
                do you perhaps, have a minimal working example at hand to share?
                And what exactly is embedded in your case?


                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.

                1 Reply Last reply
                0
                • JonBJ JonB

                  @sharath
                  So for example is the choice of Roboto font or pixelSize germane or irrelevant?

                  S Offline
                  S Offline
                  sharath
                  wrote on last edited by
                  #8

                  @JonB I'm new to this qt qml, what exactly happen if i use both Roboto font and pixelSize.

                  JonBJ 1 Reply Last reply
                  0
                  • S sharath

                    @JonB I'm new to this qt qml, what exactly happen if i use both Roboto font and pixelSize.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #9

                    @sharath
                    I don't know, it's from your code! All I meant was: is, say, the choice of font or pixel size you have made affecting the behaviour? You should be able to remove those, and other properties, to see whether you still have bad behaviour, till you can reproduce a minimal example which goes wrong for other people to look at.

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      epic
                      wrote on last edited by epic
                      #10

                      @sharath
                      I can see the same behavior on my embedded device. I use Qt5 and Ubuntu 14.04.
                      Did you solve the problem already?

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        Iheb
                        wrote on last edited by
                        #11

                        Try adding this line: renderType: Text.NativeRendering

                        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