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

Add setData & dataChanged to QtAbstractItemModel Java class

    XMLWordPrintable

Details

    • User Story
    • Resolution: Done
    • P1: Critical
    • 6.9
    • None
    • QPA: Android
    • Android
    • a065c6bfe (dev), 8ec25c9d6 (dev), ab027eb73 (dev), f167150a6 (dev)

    Description

      Why?

      Cause

      • Otherwise,
        • Editing the model from UI would not be possible. 
        • For dynamic models, it's still possible to use remove+add APIs but it usually forces destructing & constructing the objects of the view which add a major performance cost to applications.

      Customer

      • QML for Next minimal app

      Cruft

      •  

      What?

      Definition

      • QAbstractItemModel::setData & QAbstractItemModel::dataChanged need to be exposed on the Java class to let the user to create dynamic models that get partial updates.

      Demarcation

      •  

      Dependencies

      • 6.9 FF

      How?

      Like current APIs, these two APIs can be exposed to the Java API. In Qt 6.8.0, there are no callback interfaces that can act as an equivalent to slot of the signal. Apart from adding these APIs, we may also need to add such callback interfaces & necessary APIs to connect to the callback.

      Note: Alternatively, we may want to use QtSignalListener Java class as a generic interface, instead of adding new interfaces. QtSignalListener does not support multiple parameters but it's generic type, can still deliver a collection of parameters if we want to opt for such solution.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-129387
          # Subject Branch Project Status CR V

          Activity

            People

              soarmin Soheil Armin
              soarmin Soheil Armin
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes