Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1
-
None
-
Ubuntu 13.10, Qt 5.2.1
Description
TextArea's implicitHeight is inconsistent since it is not adjusted with it's content whereas TextEdit's implicitHeight can be used to set the box size to the content size.
import QtQuick 2.2 import QtQuick.Controls 1.1 Rectangle { width: 640 height: 500 color: "gray" Row { anchors.fill: parent anchors.margins: 20 spacing: 20 Column { id: columnLeft spacing: 5 width: 250 TextArea { text: "One Liner" anchors.left: parent.left anchors.right: parent.right height: implicitHeight } TextArea { text: "Two Lines\nof Text" anchors.left: parent.left anchors.right: parent.right height: implicitHeight } TextArea { text: "Massive\n\nMulti-\nLine-\nText" anchors.left: parent.left anchors.right: parent.right height: implicitHeight } } Column { id: columnRight spacing: 5 width: 250 TextEdit { text: "One Liner" anchors.left: parent.left anchors.right: parent.right height: implicitHeight selectByMouse: true } TextEdit { text: "Two Lines\nof Text" anchors.left: parent.left anchors.right: parent.right height: implicitHeight selectByMouse: true } TextEdit { text: "Massive\n\nMulti-\nLine-\nText" anchors.left: parent.left anchors.right: parent.right height: implicitHeight selectByMouse: true } } } }