[Interest] More QML Styling woes.

Jason Hihn jhihn at gmx.com
Sat May 17 06:37:35 CEST 2014

I still haven't figured out to have the TextField background rect to autosize to the implcitheight. I can set it explicitly as "45" below, but I'd rather not hard-code it. What can I set to have it adjust automatically?

Next up, let's compare styling a TextField vs a TextArea. We can't set a radius on the border on the TextArea. It would be cool if it took a Rect for the background like TextField.

TextField {
width: parent.width
height: implicitHeight
style: TextFieldStyle {
textColor: "black"
font {pixelSize: 30}
background: Rectangle {
radius: 10
border.width: 1
border.color: "black"
implicitHeight: 45

TextArea {
width: parent.width
frameVisible: true
height: 125
style: TextAreaStyle {
textColor: "black"
font {pixelSize: 30}
backgroundColor: "lightgray"
//background: Rectangle {
//radius: 10
//border.width: 1
//border.color: "black"
//implicitHeight: 45
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140517/285e68f0/attachment.html>

More information about the Interest mailing list