Important: Please read the Qt Code of Conduct -

TextArea that's scrollable/repositionable?

    1. Basic feature I'm trying to figure out is how to create a text input field (read-only or not) that if there is more text than can be displayed, I can implement some up/down arrows on the side or a slider bar so that I can scroll through the text. (on a touchscreen device, so not mouse scrolling). For a QML ListView, I figured out that I could change the selected index and have the view track the selected item. For this text input, would you similarly move the cursor position and use that to adjust the section of text displayed?

    2. TextArea seemed like a good candidate for this feature because you can set the cursor position, and from the documentation it looks like it was available in Qt Components 1.0 and later (I'm using Qt 4.7.4 with Qt Components 1.1), but for some reason TextArea isn't a recognized object type for me.

    @import QtQuick 1.1

    Rectangle {
    width: 100
    height: 62

    TextArea {
        id: testTextArea
        width: 50
        height: 30
        anchors.verticalCenter: parent.verticalCenter
        anchors.horizontalCenter: parent.horizontalCenter
        text: "Test123456789"


  • You should add

    import 1.1

Log in to reply