Dear Sirs and Madams!

I have following custom QML Button, named UeButton (in file UeButton.qml):
Qt Code:
  1. import QtQuick.Controls 1.4
  2. import QtQuick.Controls.Styles 1.4
  3. import QtQuick 2.5
  4.  
  5. Button
  6. {
  7. id: ueButton
  8.  
  9. property string ueText
  10.  
  11. signal ueSignalButtonClicked
  12.  
  13. text: ueText
  14.  
  15. style: ButtonStyle
  16. {
  17. background: Rectangle
  18. {
  19. antialiasing: true
  20. smooth: true
  21. gradient: Gradient
  22. {
  23. GradientStop
  24. {
  25. id: ueButtonGradientStopPosition0
  26.  
  27. position: 0
  28. color: "#ffffff"
  29. } // GradientStop
  30.  
  31. GradientStop
  32. {
  33. id: ueButtonGradientStopPosition1
  34.  
  35. position: 0.418
  36. color: "#000000"
  37. } // GradientStop
  38. } // Gradient
  39.  
  40. border.color: "steelblue"
  41. border.width: 1
  42. radius: 4
  43. } // background
  44.  
  45. label: Text
  46. {
  47. color: "#ffffff"
  48. font.bold: true
  49. verticalAlignment: Text.AlignVCenter
  50. horizontalAlignment: Text.AlignHCenter
  51. font.pointSize: 16
  52.  
  53. text: control.text
  54. } // label
  55. } // ButtonStyle
  56.  
  57. MouseArea
  58. {
  59. id: ueButtonMouseArea
  60.  
  61. anchors.fill: parent
  62.  
  63. onClicked:
  64. {
  65. parent.clicked()
  66. ueButton.ueSignalButtonClicked()
  67. }
  68. } // MouseArea
  69. } // ueButton
To copy to clipboard, switch view to plain text mode 
Now, what I want is when user clicks on button, the GradientStop points gets reversed. How do I achieve this?

Sincerely,
Marko