Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Scrolling parent of text area



  • Hi.
    How can I scroll parent of this text area by scrolling text area when its value reached the end?

    Page {
        id: page 
        Flickable {
                id: flickable
                anchors.fill: parent
                anchors.margins: 5
                boundsBehavior: Flickable.OvershootBounds
                contentHeight: contentItem.childrenRect.height + 10 
                Rectangle {
                    id: rect
                    width: 300
                    height: 200
                    color: "#00000000"
                    border.width: 1
                    border.color: 'grey'
                    radius: 5
                    anchors.horizontalCenter: parent.horizontalCenter
                    anchors.top: parent.top
                    anchors.topMargin: 10
                }
                Flickable {
                    flickableDirection: Flickable.VerticalFlick
                    anchors.fill: rect
                    anchors.leftMargin: 5
                    anchors.rightMargin: 5
                    TextArea.flickable: TextArea {
                        id: textarea
                        horizontalAlignment: Text.AlignLeft
                        wrapMode: TextEdit.WordWrap
                    }
                }
        }
    }
    


  • @addr3ss said in Scrolling parent of text area:

    rent of this text area by scrolling text area when its value reached

    ScrollView {
    id: view
    anchors.fill: parent

    TextArea {
        text: "TextArea\n...\n...\n...\n...\n...\n...\n"
    }
    

    }

    Check this link below.
    https://doc.qt.io/qt-5/qml-qtquick-controls2-textarea.html#scrollable-textarea



  • @isdsi It doesnt my answer.Nothing changed.


Log in to reply