Created
June 27, 2019 09:20
-
-
Save mitchcurtis/721e51587f711f3517a29597a65fb064 to your computer and use it in GitHub Desktop.
Gradient Rectangle in Flickable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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