Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4531

QSqlTableModel: Be able to track real-time changes in a QSqlTableModel view

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • Some future release
    • 4.5.2
    • SQL Support
    • None

    Description

      My problem is that I have a QTreeView using a QSqlTableModel model, and there are other clients and other parts of my application modifying my database in real time, not using the model used by the view. I need these external changes to be reflected in the view.

      Calling QSqlTableModel::select() works – the contents of the view are updated. But calling select has the very undesirable effect of deleting the active selection(s) in the model view(s).

      It would be useful to have a way to update the model and preserve any current selection.

      Tthe best solution in most cases would be to update the model and remove any deleted items from the selection model. A signal to indicate changes to the selection in cases where selected items have changed would also be welcome.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bilking Bill King
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes