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

QSqlRelationalTableModel provides incorrect display data after editing a foreign cell

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.5.1
    • SQL Support
    • None
    • Windows 7 64-bit.

    Description

      I've created a simplest application. It displays some persons in a table view. It reads them from sqlite database together with their location information (cities). Editing can be done using QSqlRelationalDelegate class.

      After editing a foreign cell (a city of some person) I observe a value of a foreign key ("3") instead of a city's name ("USA").

      I've attached screenshots and a test source code in archive to this ticket.

      Attachments

        1. bug-sample.7z
          64 kB
          Vyacheslav Grigoryev
        2. initial.png
          23 kB
          Vyacheslav Grigoryev
        3. editing.png
          19 kB
          Vyacheslav Grigoryev
        4. after.png
          18 kB
          Vyacheslav Grigoryev

        Issue Links

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

          Activity

            People

              mabrand Mark Brand
              SG House Vyacheslav Grigoryev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes