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

QAIV does not honor edit triggers and call QAIM::submit() for NoEditTriggers hint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.11.2
    • Widgets: Itemviews

    Description

      I have an editable model, still I explicitly asked the view (QTreeView here) to not allow edition setting setEditTriggers(QAIV::NoEditTriggers) on it.
      I expect then that the view would not try to edit the model on my behalf, unless requested manually via QAIV::edit().
      Though the view is forcing QAIM::submit() (and maybe revert, to be checked) when i change the selection of my view.
      After some debugging, i found the origin being https://code.woboq.org/qt5/qtbase/src/widgets/itemviews/qtreeview.cpp.html#281
      It unconditionally submit the model without checking the view edit triggers first.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            filipe.azevedo Filipe Azevedo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes