summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tabview.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/tst_tabview.qml')
-rw-r--r--tests/auto/controls/data/tst_tabview.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tabview.qml b/tests/auto/controls/data/tst_tabview.qml
index 980b1f16..9405f793 100644
--- a/tests/auto/controls/data/tst_tabview.qml
+++ b/tests/auto/controls/data/tst_tabview.qml
@@ -223,6 +223,28 @@ TestCase {
tabView.destroy()
}
+ function test_dynamicModel() {
+ var test_tabView = ' \
+ import QtQuick 2.1; \
+ import QtQuick.Controls 1.0; \
+ TabView { \
+ id: tabView; \
+ property alias repeater: repeater; \
+ Repeater { id: repeater; Tab { } } \
+ } '
+
+ var tabView = Qt.createQmlObject(test_tabView, testCase, '')
+ compare(tabView.count, 0)
+
+ tabView.repeater.model = 4
+ compare(tabView.count, 4)
+
+ tabView.repeater.model = 0
+ compare(tabView.count, 0)
+
+ tabView.destroy()
+ }
+
function test_mousePressOnTabBar() {
var test_tabView = 'import QtQuick 2.1; \
import QtQuick.Controls 1.1; \