Some numericals missing when i'm changing Qml Label text dynamically.
-
wrote on 17 Jul 2018, 09:31 last edited by 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 appreciatedThanks
-
wrote on 17 Jul 2018, 10:19 last edited by
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? -
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 appreciatedThanks
@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.
wrote on 19 Jul 2018, 07:13 last edited by JonB@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. -
wrote on 25 Feb 2020, 14:03 last edited by
Try adding this line: renderType: Text.NativeRendering