Results 1 to 7 of 7

Thread: property binding in a repeater

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Oct 2014
    Posts
    104
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: property binding in a repeater

    I think you need to implement it using ListModel

    Qt Code:
    1. Item {
    2. id: personButtonBasis
    3.  
    4. ListModel {
    5. id: buttonModel
    6. ListElement {
    7. text: "Button 1"
    8. }
    9. ListElement {
    10. text: "Button 2"
    11. }
    12. ListElement {
    13. text: "Button 3"
    14. }
    15. ListElement {
    16. text: "Button 4"
    17. }
    18. }
    19.  
    20.  
    21. Grid {
    22. id: dataTextGrid
    23. columns: 3
    24. Repeater {
    25. id: dataFieldRepeater
    26. model: buttonModel
    27. Text {
    28. text: model.text
    29. }
    30. }
    31. }
    32. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to joko for this useful post:

    sedi (23rd March 2015)

Similar Threads

  1. repeater polish() loop on ios
    By joko in forum Qt Quick
    Replies: 8
    Last Post: 13th March 2015, 15:35
  2. Access parent property from repeater
    By c1223 in forum Qt Quick
    Replies: 3
    Last Post: 28th November 2014, 06:11
  3. Dynamic QML Property Binding
    By EMCEE in forum Qt Quick
    Replies: 1
    Last Post: 30th August 2012, 11:51
  4. QML Property Binding update does not propagate
    By bluestreak in forum Qt Quick
    Replies: 0
    Last Post: 21st August 2012, 19:24
  5. Replies: 0
    Last Post: 17th October 2011, 13:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.