Results 1 to 3 of 3

Thread: Autosave in a spinbox delegate

  1. #1
    Join Date
    Mar 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Autosave in a spinbox delegate

    I want to auto save when the user changes a value in a spinbox delegate. But how do I update a spinbox delegate editor model without closing the editor(not perform commitData and closeEditor)?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Autosave in a spinbox delegate

    You can call setModelData manually or emit commitData() from the delegate.

  3. #3
    Join Date
    Mar 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Autosave in a spinbox delegate

    I have followed your advice and used commitdata()...works like a charm! Thank you wysota.

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.