Results 1 to 16 of 16

Thread: QSqlTableModel insert works fine, delete not so much...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: QSqlTableModel insert works fine, delete not so much...

    You may also want to have a look at that thread: http://www.qtcentre.org/threads/1608...-quot?p=179842

    Al_

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

    scott_hollen (4th March 2011)

  3. #2
    Join Date
    Jun 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSqlTableModel insert works fine, delete not so much...

    The row does not get deleted when removerow is called after setdata.
    If setdata is not called delete row works perfect.
    I am using qsqltablemodel here.
    Can you please help me with this problem?

  4. #3
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: QSqlTableModel insert works fine, delete not so much...

    Quote Originally Posted by pavithrap View Post
    The row does not get deleted when removerow is called after setdata.
    If setdata is not called delete row works perfect.
    I am using qsqltablemodel here.
    Can you please help me with this problem?
    I am still interested in this topic, thus also in your post. One of my issues was that deleted rows were still visible until commited; I solved this by filtering rows out that have the exclamaition sign as deleted-but-not-yet-commited flag.
    Please provide more detail. When does your application commit data (manually, rowchange, fieldchange)? What do you mean by 'Row does not get deleted'? Is that row flagged as having been deleted (by the exclamation sign in the row header)? Do you have an example program (optimally fully working mian(){ })?

Similar Threads

  1. Replies: 1
    Last Post: 31st December 2010, 16:35
  2. How to know not insert or delete query?
    By ramazangirgin in forum Qt Programming
    Replies: 2
    Last Post: 29th June 2010, 13:43
  3. Replies: 3
    Last Post: 11th December 2009, 17:13
  4. Replies: 1
    Last Post: 30th March 2009, 22:25
  5. update() works fine sometime but not everytime..!!
    By salmanmanekia in forum Qt Programming
    Replies: 19
    Last Post: 22nd August 2008, 09:11

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.