Results 1 to 9 of 9

Thread: Updating QSqlRelationalDelegate/QSqlTableModel/QSqlTableModel when database changes?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Updating QSqlRelationalDelegate/QSqlTableModel/QSqlTableModel when database chang

    Call reset() on the model (or select() on a QSqlTableModel) when a signal is received from an updating thread or periodically using a timer. You will lose any uncommitted edits, the current item, and any selections on views attached to the models.

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

    will49 (22nd March 2011)

Similar Threads

  1. QSqlTableModel the database does not update
    By Zander87 in forum Qt Programming
    Replies: 4
    Last Post: 27th February 2011, 22:34
  2. Disconnecting from database after using QSqlTableModel
    By RobbieClarken in forum Qt Programming
    Replies: 6
    Last Post: 8th April 2009, 09:51
  3. Replies: 2
    Last Post: 23rd February 2008, 01:58
  4. How to manage QSqlTableModel database operations?
    By Abk in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2007, 10:44
  5. QSqlTableModel Help pls
    By munna in forum Newbie
    Replies: 1
    Last Post: 7th March 2006, 19:40

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.