Details
-
Bug
-
Resolution: Invalid
-
P4: Low
-
5.14.1
-
None
-
-
c7e7fe1f56852863217e052224e80464c9c0fdb8 (qt/qtquickcontrols/dev) 55e2298f3ff0130fddb09ccd1bcfddce61a8abdb (qt/qtquickcontrols/5.15)
Description
At https://doc.qt.io/qt-5/qml-qtquick-controls-textarea.html#wrapMode-prop
TextArea's wrapMode is documented to default to WordWrap but it actually defaults to NoWrap. This can be seen by running the example at the top of the above-linked reference page; a single line appears with most of the text truncated, unlike in the image shown.
import QtQuick.Controls 2.14 import QtQuick 2.14 TextArea { width: 400; height: 200 text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, " + "sed do eiusmod tempor incididunt ut labore et dolore magna " + "aliqua. Ut enim ad minim veniam, quis nostrud exercitation " + "ullamco laboris nisi ut aliquip ex ea commodo cosnsequat. "; Component.onCompleted: { if (wrapMode == TextEdit.NoWrap) { console.log("wrapMode=NoWrap") } else if (wrapMode == TextEdit.WordWrap) { console.log("wrapMode=WordWrap") } else if (wrapMode == TextEdit.WrapAnywhere) { console.log("wrapMode=WrapAnywhere") } else if (wrapMode == TextEdit.Wrap) { console.log("wrapMode=Wrap") } else { console.log("Unknown wrapMode", wrapMode) } } } // result is NoWrap