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 Updated to NodeBB v4.3 + New Features

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.6k 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.
  • S Offline
    S Offline
    sharath
    wrote on 17 Jul 2018, 09:31 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 1 Reply Last reply 18 Jul 2018, 07:46
    0
    • D Offline
      D Offline
      DavidM29
      wrote on 17 Jul 2018, 10:19 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 17 Jul 2018, 11:29 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

        J 1 Reply Last reply 17 Jul 2018, 17:33
        0
        • S sharath
          17 Jul 2018, 11:29

          @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

          J Offline
          J Offline
          JonB
          wrote on 17 Jul 2018, 17:33 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 18 Jul 2018, 06:30
          0
          • J JonB
            17 Jul 2018, 17:33

            @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 18 Jul 2018, 06:30 last edited by
            #5

            @JonB Yes i have tried with that also.

            J 1 Reply Last reply 18 Jul 2018, 07:42
            0
            • S sharath
              18 Jul 2018, 06:30

              @JonB Yes i have tried with that also.

              J Offline
              J Offline
              JonB
              wrote on 18 Jul 2018, 07:42 last edited by
              #6

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

              S 1 Reply Last reply 19 Jul 2018, 07:09
              0
              • S sharath
                17 Jul 2018, 09:31

                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 Offline
                J Offline
                J.Hilk
                Moderators
                wrote on 18 Jul 2018, 07:46 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
                • J JonB
                  18 Jul 2018, 07:42

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

                  S Offline
                  S Offline
                  sharath
                  wrote on 19 Jul 2018, 07:09 last edited by
                  #8

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

                  J 1 Reply Last reply 19 Jul 2018, 07:13
                  0
                  • S sharath
                    19 Jul 2018, 07:09

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

                    J Offline
                    J Offline
                    JonB
                    wrote on 19 Jul 2018, 07:13 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 27 Mar 2019, 07:32 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 25 Feb 2020, 14:03 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