I want change botton color, with click on it.
like picture under.
dokme.gif
my code:
Qt Code:
  1. import QtQuick 2.0
  2. import QtQuick.Controls 1.1
  3. Item {
  4. width: 100; height: 100
  5. property bool bImgChange: true
  6.  
  7. Component.onCompleted: {
  8. for (var i = 0; i < 5; i++)
  9. repeater.append({"name": i})
  10. }
  11.  
  12. Row {
  13. Repeater {
  14. model: ListModel {
  15. id: repeater
  16. }
  17.  
  18. Button {
  19. id:dokme
  20. y:20
  21. width:20
  22. height:20
  23. Text{
  24. text:name
  25. anchors.centerIn: parent
  26. }
  27.  
  28. }
  29. }
  30. }
  31. }
To copy to clipboard, switch view to plain text mode