diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-06-17 13:32:09 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-06-20 05:19:41 +0000 |
commit | 6a8f7b88a7a71126ac8bbf1815362351b9db954b (patch) | |
tree | 4eeedad31b31ace0d0a5caf101d19ff9c0d67239 /tests/auto/controls/data/tst_tabbar.qml | |
parent | 47744a1d5c91cad58b94ba3cc3b886793789e870 (diff) |
Add QQuickContainer::increment|decrementCurrentIndex()
[ChangeLog][Container] Added incrementCurrentIndex() and
decrementCurrentIndex() methods for changing the current
index without losing its property binding.
Change-Id: Id44e0db5e3d0951eb77b0124a83c5eb3df898012
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_tabbar.qml')
-rw-r--r-- | tests/auto/controls/data/tst_tabbar.qml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_tabbar.qml b/tests/auto/controls/data/tst_tabbar.qml index b46f7f00..666fc2cb 100644 --- a/tests/auto/controls/data/tst_tabbar.qml +++ b/tests/auto/controls/data/tst_tabbar.qml @@ -40,7 +40,7 @@ import QtQuick 2.2 import QtTest 1.0 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 TestCase { id: testCase @@ -144,6 +144,16 @@ TestCase { compare(control.currentItem.text, "2") compare(control.currentItem.checked, true) + control.decrementCurrentIndex() + compare(control.currentIndex, 1) + compare(control.currentItem.text, "1") + compare(control.currentItem.checked, true) + + control.incrementCurrentIndex() + compare(control.currentIndex, 2) + compare(control.currentItem.text, "2") + compare(control.currentItem.checked, true) + control.destroy() } |