Skip to content

Instantly share code, notes, and snippets.

@vannell
Created January 6, 2015 16:11
Show Gist options
  • Save vannell/6e6cb3b12b85c719c226 to your computer and use it in GitHub Desktop.
Save vannell/6e6cb3b12b85c719c226 to your computer and use it in GitHub Desktop.
import QtQuick 2.3
Item {
id: root
width: 400
height: 400
Flickable {
anchors.fill: parent
contentWidth: grid.width
contentHeight: grid.height
Grid {
id: grid
width: 2 * root.width
height: 2 * root.height
columns: 2
Rectangle {
color: "red"
width: root.width
height: root.height
}
Rectangle {
color: "green"
width: root.width
height: root.height
}
Rectangle {
color: "blue"
width: root.width
height: root.height
}
Rectangle {
color: "yellow"
width: root.width
height: root.height
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment