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

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



  • 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



  • 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)



  • @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



  • @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?



  • @JonB Yes i have tried with that also.



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


  • Moderators

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



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



  • @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.



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



  • Try adding this line: renderType: Text.NativeRendering


Log in to reply