summaryrefslogtreecommitdiffstats
path: root/examples/declarative/fillmode/content/QtLogo.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/fillmode/content/QtLogo.qml')
-rw-r--r--examples/declarative/fillmode/content/QtLogo.qml30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/declarative/fillmode/content/QtLogo.qml b/examples/declarative/fillmode/content/QtLogo.qml
new file mode 100644
index 0000000..6dd714d
--- /dev/null
+++ b/examples/declarative/fillmode/content/QtLogo.qml
@@ -0,0 +1,30 @@
+import Qt 4.7
+
+Item {
+ id: qtLogo
+
+ property alias fillMode: image.fillMode
+ property alias label: labelText.text
+
+ width: ((window.width - 20) - ((grid.columns - 1) * grid.spacing)) / grid.columns
+ height: ((window.height - 20) - ((grid.rows - 1) * grid.spacing)) / grid.rows
+
+ Column {
+ anchors.fill: parent
+
+ Rectangle {
+ height: qtLogo.height - 30; width: qtLogo.width
+ border.color: "black"; clip: true
+
+ Image {
+ id: image
+ anchors.fill: parent; smooth: true; source: "qt-logo.png"
+ }
+ }
+
+ Text {
+ id: labelText; anchors.horizontalCenter: parent.horizontalCenter
+ height: 30; verticalAlignment: Text.AlignVCenter
+ }
+ }
+}