Results 1 to 7 of 7

Thread: property binding in a repeater

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: property binding in a repeater [SOLVED]

    In such a case I would suggest keeping the data locally referencable instead

    Qt Code:
    1. delegate: Item {
    2. id: delegateRoot
    3. readonly property text: model.text
    4.  
    5. Text {
    6. text: delegateRoot.text // or here also: parent.text
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 
    That way you can potentially use the delegate in other views, referencing the model through a named view binds it to that specific view instance (can't even rename the view without breaking the delegate!)

    Cheers,
    _

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

    sedi (2nd April 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.