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

QDataWidgetMapper doesn't update ComboBox after changing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.5.0
    • Fix Version/s: None
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Environment:
      Windows 7

      Description

      Regards this example:
      http://doc.qt.io/qt-5/qtsql-sqlwidgetmapper-example.html

      SQL Widget Mapper example's combobox stops updating the information on that record once it has been changed, instead cloning the most recent combobox entry when using the next/previous buttons. This occurs regardless of whether the underlying database has been correctly updated.

      Specific steps to replicate:

      1. Open Sql Widget Mapper Example in QtCreator, run

      2. Click 'Next'. Name field should read 'Bob', Type should read 'Work'.

      3. Change 'Work' to 'Other'.

      4. Click 'Previous' (Alice). Click 'Next' (Bob).
      Note: At this point Bob's 'Type' field shows 'Home' for me. Notably, this is Alice's 'Type', neither Bob's original 'Type' nor his recently set 'Type'.

      Optional: Change other records, then Next and Previous around to watch how the comboBox stops updating it's text/index once it has been changed, instead taking the value of whichever record was displayed immediately before.

      See this forum post:
      https://forum.qt.io/topic/63442/sql-widget-mapper-example-weirdness

      May be related to:
      https://bugreports.qt.io/browse/QTBUG-23973

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            joeb Joe
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes