aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-02-22 14:13:39 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-02-23 09:26:12 +0000
commit9d32fd6f446844a713d520fe02aa8c5c2104898d (patch)
treebed3c531e4651271619bec74253899f7c5af2b61 /src/imports
parent95168d58afb13409c07375eafd6897b4097e4287 (diff)
Add SpinBox::editable property
The default value is false, which is more mobile/embedded/touch friendly choice, and will be also in line with ComboBox::editable when it gets introduced sometime in the future. Change-Id: Iaaad8f5533100c2d5c4b49d1ef8ee849cf31feff Task-number: QTBUG-51114 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/SpinBox.qml1
-rw-r--r--src/imports/controls/material/SpinBox.qml1
-rw-r--r--src/imports/controls/plugins.qmltypes1
-rw-r--r--src/imports/controls/universal/SpinBox.qml1
-rw-r--r--src/imports/templates/plugins.qmltypes1
5 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml
index 77f89206..d3184626 100644
--- a/src/imports/controls/SpinBox.qml
+++ b/src/imports/controls/SpinBox.qml
@@ -74,6 +74,7 @@ T.SpinBox {
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
+ readOnly: !control.editable
validator: control.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
diff --git a/src/imports/controls/material/SpinBox.qml b/src/imports/controls/material/SpinBox.qml
index 5d2044e6..f6aba60d 100644
--- a/src/imports/controls/material/SpinBox.qml
+++ b/src/imports/controls/material/SpinBox.qml
@@ -75,6 +75,7 @@ T.SpinBox {
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
+ readOnly: !control.editable
validator: control.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index 62206af5..efe56ce8 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -579,6 +579,7 @@ Module {
Property { name: "to"; type: "int" }
Property { name: "value"; type: "int" }
Property { name: "stepSize"; type: "int" }
+ Property { name: "editable"; type: "bool" }
Property { name: "validator"; type: "QValidator"; isPointer: true }
Property { name: "textFromValue"; type: "QJSValue" }
Property { name: "valueFromText"; type: "QJSValue" }
diff --git a/src/imports/controls/universal/SpinBox.qml b/src/imports/controls/universal/SpinBox.qml
index 77eb241e..b3185452 100644
--- a/src/imports/controls/universal/SpinBox.qml
+++ b/src/imports/controls/universal/SpinBox.qml
@@ -80,6 +80,7 @@ T.SpinBox {
verticalAlignment: TextInput.AlignVCenter
renderType: Text.NativeRendering
+ readOnly: !control.editable
validator: control.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes
index 7c0add11..05ea33ec 100644
--- a/src/imports/templates/plugins.qmltypes
+++ b/src/imports/templates/plugins.qmltypes
@@ -573,6 +573,7 @@ Module {
Property { name: "to"; type: "int" }
Property { name: "value"; type: "int" }
Property { name: "stepSize"; type: "int" }
+ Property { name: "editable"; type: "bool" }
Property { name: "validator"; type: "QValidator"; isPointer: true }
Property { name: "textFromValue"; type: "QJSValue" }
Property { name: "valueFromText"; type: "QJSValue" }