[Interest] Styled text not setting control size

Nurmi J-P jpnurmi at digia.com
Wed May 14 11:02:56 CEST 2014


On 14 May 2014, at 05:05, Jason H <scorp1us at yahoo.com> wrote:

>    TextField {
>     width: parent.width
>     style: TextFieldStyle {
>      textColor: "white"
>      font {pixelSize: 30}
>      background: Rectangle { color:"black" }
>     }
>    }
> When using the code above, the black area is about 1/2 the height of the letters that are entered into the text field. The letters protrude above the black box.
> 
> It should use the implicit height, should it not?
> 

Looks like TextField currently takes the implicit height of the background delegate. I’ll fix it to be a bit more bulletproof in Qt 5.3.1, meanwhile you can set implicit height for the background to get desired height.

--
J-P Nurmi




More information about the Interest mailing list