summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Witick <jussi.witick@qt.io>2017-02-17 08:27:12 (GMT)
committerJ-P Nurmi <jpnurmi@qt.io>2017-06-16 12:44:40 (GMT)
commitf19b1bf1bfee79178bf5cd75df86863be49c21f0 (patch)
tree15f6184f332011f9e4de543d337d555c08e8d814
parentae688459bc845ab919ce256f315843d97ba9ff32 (diff)
downloadqtquickcontrols-f19b1bf1bfee79178bf5cd75df86863be49c21f0.tar.gz
Increase QtQuick import from 2.2 to 2.6 for QML Label
Increase QtQuick import version to 2.6 to enable the properties of underlying QML Text type to be usable in the QML Label type too. Task-number: QTBUG-57895 Change-Id: I7a2b641a56c90ab91b4e6c973278d8943fa6903a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r--src/controls/Label.qml2
-rw-r--r--tests/auto/controls/data/tst_label.qml11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/controls/Label.qml b/src/controls/Label.qml
index f9bc8cd..ea3f27b 100644
--- a/src/controls/Label.qml
+++ b/src/controls/Label.qml
@@ -37,7 +37,7 @@
**
****************************************************************************/
-import QtQuick 2.2
+import QtQuick 2.6
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
diff --git a/tests/auto/controls/data/tst_label.qml b/tests/auto/controls/data/tst_label.qml
index e5c53a5..145c7f1 100644
--- a/tests/auto/controls/data/tst_label.qml
+++ b/tests/auto/controls/data/tst_label.qml
@@ -69,6 +69,17 @@ TestCase {
label.destroy()
}
+ function test_textPaddings() {
+ var label = Qt.createQmlObject('import QtQuick.Controls 1.2; Label { leftPadding: 2; rightPadding: 2; topPadding: 2; bottomPadding: 2 }', testCase, '');
+
+ compare(label.leftPadding, 2)
+ compare(label.rightPadding, 2)
+ compare(label.topPadding, 2)
+ compare(label.bottomPadding, 2)
+
+ label.destroy()
+ }
+
function test_activeFocusOnTab() {
if (Qt.styleHints.tabFocusBehavior != Qt.TabFocusAllControls)
skip("This function doesn't support NOT iterating all.")