Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.12.9, 5.15.0
-
None
Description
when using TextArea with ScrollBar,there is a bug.
the doc suggests us to write code like this:
ApplicationWindow { width: 640 height: 480 visible: true title: qsTr("Scroll") Component.onCompleted: { for(var loop=0;loop<1000;++loop) { text.append("1234567890"); } } ScrollView { id: view anchors.fill: parent TextArea { id:text text: "TextArea\n...\n...\n...\n...\n...\n...\n" } ScrollBar.vertical: ScrollBar{} } }
but the above scollbar does not work well.in that case ,there has two scrollbar ,one is at the top left,the other is vertical.but the top left one can scoll the textarea.the vertical one has nothing effect.in some complicated situation ,there is only one srollbar at top left.
if you change code to below:
ApplicationWindow { width: 640 height: 480 visible: true title: qsTr("Scroll") Component.onCompleted: { for(var loop=0;loop<1000;++loop) { text.append("1234567890"); } } ScrollView { id: view anchors.fill: parent TextArea { id:text text: "TextArea\n...\n...\n...\n...\n...\n...\n" } } ScrollBar.vertical: ScrollBar{} }
then the application output window will display like this:
qrc:/main.qml:5:1: QML ApplicationWindow: ScrollBar must be attached to a Flickable or ScrollView
but in that case ,there is only one ScollBar at vertical.
I remeber 5.9 does not has this bug.when I use 5.12 I discover this bug some week ago.