summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml')
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
index 1db56c4..f600e85 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml
@@ -1,6 +1,9 @@
import Qt 4.6
Item {
+ function clear() {
+ loader.sourceComponent = undefined
+ }
Component { id: comp; Rectangle { width: 100; height: 50 } }
- Loader { sourceComponent: comp }
+ Loader { id: loader; sourceComponent: comp }
}