[Interest] More QML Styling Woes.

Jason Hihn jhihn at gmx.com
Sat May 17 06:42:52 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
color:"lightgray"
}
}
}

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
//color:"lightgray"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140517/9785be15/attachment.html>


More information about the Interest mailing list