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

QAbstractItemModel dataChanged signal is emitted twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.0.2
    • Widgets: Itemviews
    • None
    • Mac OS X 10.8.3

    Description

      QAbstractItemMode::dataChanged signal is emitted twice when data is edited in a QTableView connected to a QSqlTableModel. Please see attached minimal, compilable demo project for demonstration.

      In the demo, please click Browse button first, and select a destination file for the SQLite database, then click on Process button, which will create a table and insert 3 records into the database and populate the model. Then, double click any of the 3 displayed rows and edit the data. As soon as you click away, you will see a message box appear twice, indicating the dataChanged signal was emitted twice. This will happen each time you edit any of the cells.

      Attachments

        1. dataChanged.zip
          3 kB
          Slava Feshchenko
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mabrand Mark Brand
            slavaf2000 Slava Feshchenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes