diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput/data')
7 files changed, 87 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml new file mode 100644 index 0000000..ddc98cc --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml @@ -0,0 +1,8 @@ +import Qt 4.6 + +Rectangle { width: 300; height: 300; color: "white" + TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject" + resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance";} } ] + cursorDelegate: cursor + } +} diff --git a/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml new file mode 100644 index 0000000..b404682 --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +TextInput { + text: "Hello world!" + inputMethodHints: Qt.ImhNoPredictiveText +} diff --git a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml new file mode 100644 index 0000000..08a857c --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml @@ -0,0 +1,7 @@ +import Qt 4.6 + +TextInput{ + focus: true + objectName: "myInput" + inputMask: "HHHHhhhh; " +} diff --git a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml new file mode 100644 index 0000000..7cbeadd --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml @@ -0,0 +1,7 @@ +import Qt 4.6 + +TextInput{ + focus: true + objectName: "myInput" + maximumLength: 10 +} diff --git a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml new file mode 100644 index 0000000..493db5b --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml @@ -0,0 +1,24 @@ +import Qt 4.6 + +Rectangle { + property var myInput: input + + width: 800; height: 600; color: "blue" + + Item { + id: firstItem; + KeyNavigation.right: input + } + + TextInput { id: input; focus: true + text: "Needs some text" + KeyNavigation.left: firstItem + KeyNavigation.right: lastItem + KeyNavigation.up: firstItem + KeyNavigation.down: lastItem + } + Item { + id: lastItem + KeyNavigation.left: input + } +} diff --git a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml new file mode 100644 index 0000000..c47371a --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml @@ -0,0 +1,12 @@ +import Qt 4.6 + +Rectangle { + property var myInput: input + + width: 800; height: 600; color: "blue" + + TextInput { id: input; focus: true + readOnly: true + text: "I am the very model of a modern major general.\n" + } +} diff --git a/tests/auto/declarative/qdeclarativetextinput/data/validators.qml b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml new file mode 100644 index 0000000..0c81548 --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml @@ -0,0 +1,23 @@ +import Qt 4.7 + +Item { + property var intInput: intInput + property var dblInput: dblInput + property var strInput: strInput + + width: 800; height: 600; + + Column{ + TextInput { id: intInput; + validator: QIntValidator{top: 11; bottom: 2} + } + TextInput { id: dblInput; + validator: QDoubleValidator{top: 12.12; bottom: 2.93; decimals: 2; notation: QDoubleValidator.StandardNotation} + } + TextInput { id: strInput; + //Requires QTBUG-8025 to be implemented first + //validator: QRegExpValidator { regExp: /[a-zA-z]{2,4}/;} + } + } + +} |