Results 1 to 5 of 5

Thread: Editable SqlQueryModel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    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: Editable SqlQueryModel

    You will have to reimplement the setData() function and store the edited data in your model subclass.
    In data() you then need to check if you have local data for the respective cell and return it instead.

    From you description I take that you have only one such column, so a simple mapping from inf (row) to QVariant (data) should do the trick for the local storage.

    Cheers,
    _

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

    Miss Engineer (15th May 2014)

Similar Threads

  1. Replies: 1
    Last Post: 19th January 2014, 23:29
  2. Replies: 2
    Last Post: 1st May 2013, 06:49
  3. TableView + SqlQueryModel: can't insert or edit rows
    By jiveaxe in forum Qt Programming
    Replies: 3
    Last Post: 27th September 2008, 21:55
  4. editable rectangles
    By parmar ranjit in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2008, 09:59

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.