diff options
Diffstat (limited to 'tests/auto/quick/qquickloader/data/sizebound.qml')
-rw-r--r-- | tests/auto/quick/qquickloader/data/sizebound.qml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickloader/data/sizebound.qml b/tests/auto/quick/qquickloader/data/sizebound.qml new file mode 100644 index 0000000000..09cf32426a --- /dev/null +++ b/tests/auto/quick/qquickloader/data/sizebound.qml @@ -0,0 +1,30 @@ +import QtQuick 2.0 + +Item { + width: 200; height: 200 + + function switchComponent() { + load.sourceComponent = comp2 + } + + Component { + id: comp + Rectangle { + width: 50; height: 60; color: "red" + } + } + + Component { + id: comp2 + Rectangle { + width: 80; height: 90; color: "green" + } + } + + Loader { + id: load + objectName: "loader" + sourceComponent: comp + height: item ? item.height : 0 + } +} |