Skip to content

Instantly share code, notes, and snippets.

@mitchcurtis
Created June 27, 2019 09:20
Show Gist options
  • Save mitchcurtis/721e51587f711f3517a29597a65fb064 to your computer and use it in GitHub Desktop.
Save mitchcurtis/721e51587f711f3517a29597a65fb064 to your computer and use it in GitHub Desktop.
Gradient Rectangle in Flickable
import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
visible: true
width: 640
height: 480
Flickable {
id: flickable
clip: true
anchors.fill: parent
contentWidth: rectangle.width
contentHeight: rectangle.height
Rectangle {
id: rectangle
width: 1000
height: 1000
gradient: Gradient {
GradientStop {
position: 0
color: "navajowhite"
}
GradientStop {
position: 1
color: "salmon"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment