aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/text/textedit_selection_color.qml
blob: 5143ed53153b62cf2308276e73f9e5f23acfc9ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQuick 2.0

Item {
    width: 320
    height: 480

    TextEdit {
        id: textEdit
        anchors.centerIn: parent
        width: parent.width
        font.pixelSize: 14
        text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nibh"
        wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere

        selectionColor: "red"
        selectedTextColor: "blue"

        Component.onCompleted: {
            textEdit.select(6, 17)
        }
    }
}