Results 1 to 4 of 4

Thread: Access delegate Property

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2013
    Posts
    33
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Access delegate Property

    Hi
    I want to access the delegates property when i click an button. Here is the simple code
    Qt Code:
    1. ListView{
    2. id: listt
    3. model: 10
    4. clip:true
    5. width: parent.width
    6. spacing: 25
    7. height: 500
    8. anchors{left: parent.left;leftMargin: 50;top: parent.top;topMargin: 50}
    9. delegate: listDelegate
    10. }
    11.  
    12. Component {
    13. id: listDelegate
    14.  
    15. Item{
    16. CheckBox{
    17. id: checker
    18. text: "A"
    19. checked:true
    20. }
    21. }
    22. }
    23.  
    24. Button{
    25. anchors{right: parent.right;rightMargin: 50;top: parent.top;topMargin: 150}
    26. width: 100
    27. height: 50
    28. text: "CLICK"
    29. MouseArea{
    30. anchors.fill: parent
    31. onClicked: {
    32. // Here i want to read or write all 10(model) values.
    33. }
    34. }
    35. }
    To copy to clipboard, switch view to plain text mode 
    How do i achieve delegates property when i click an button.How do i take reference for it and access outside for reading and writing?
    Please suggest the ways to do.


    Regards
    Bala Beemaneni
    Last edited by anda_skoa; 10th February 2016 at 09:33. Reason: missing [code] tags

Similar Threads

  1. Increment a property inside repeater delegate
    By beemaneni in forum Qt Quick
    Replies: 3
    Last Post: 8th May 2015, 07:32
  2. how to access QAxObject property?
    By 0BLACK0 in forum Qt Programming
    Replies: 0
    Last Post: 17th February 2015, 11:53
  3. Access parent property from repeater
    By c1223 in forum Qt Quick
    Replies: 3
    Last Post: 28th November 2014, 06:11
  4. Access object property in JS
    By folibis in forum Qt Quick
    Replies: 1
    Last Post: 18th January 2014, 13:23
  5. Replies: 1
    Last Post: 23rd June 2012, 13:23

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.