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

Make append, count, at, clear methods in QDeclarativeListProperty compulsory

    XMLWordPrintable

Details

    Description

      In QDeclarativeListProperty, append(), at(), clear() and count() are optional. Problem with this is that these methods are required in QmlDesigner.

      QmlDesigner is built upon the assumption that list properties can be manipulated - we rely on the fact that we can also remove objects at runtime, e.g. when the corresponding element in the .qml file is removed ... Now I know that for some 'special' properties like data there isn't any straigtforward implementation of at(), clear() and count() - every such property requires a custom hack in Quick Designer. Problem with the current interface is that having a property e.g. without clear() is actively supported - I'd very much prefer having all 4 methods mandatory, and live with the fact that e.g. for data, some of the functions are just empty.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            kkohne Kai Köhne
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes