Re: [Interest] Align text to top of Text

2017-03-28 Thread André Somers
Sent from my phone, please excuse my brevity > On 28 Mar 2017, at 21:14, Shantanu Tushar wrote: > > Hi Jason, > > Thanks for the quick reply! Have you used the negative topPadding technique > in practice? If yes did you use a fixed value or could you calculate it using

Re: [Interest] Align text to top of Text

2017-03-28 Thread Shantanu Tushar
Hi Jason, Thanks for the quick reply! Have you used the negative topPadding technique in practice? If yes did you use a fixed value or could you calculate it using QFontMetrics? Cheers, On Wed, Mar 29, 2017 at 12:36 AM, Jason Allen wrote: > You are positioning the

Re: [Interest] Align text to top of Text

2017-03-28 Thread Jason Allen
You are positioning the text and the topmost left edge correctly, but also consider that depending on a font or character typed, not all characters take up the full available height. Characters like ` ' | / \ and " are sometimes above the height of latin letters, as are capital-case letters with

[Interest] Align text to top of Text

2017-03-28 Thread Shantanu Tushar
Hi, I'm trying to align some text in a Text so that it exactly touches the left and top edges of the Text item. With the following- Rectangle { anchors { fill: parent; margins: 5 } border { width: 1; color: "red" } Text { anchors.fill: parent topPadding: 0