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

make item, itemAtIndex, itemAt methods consistent

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None

    Description

      Repeater's itemAt takes an index, but "at" should always signify that it takes a pixel location. So we should deprecate itemAt and perhaps start using item(int idx) for such cases I think? Or, is that bad because of possible overloading anywhere else that we could have an item property or an item(something) method? Perhaps overloading isn't so bad.

      Also, I think methods like itemAt(x, y) should be overloaded to take a QPointF, when possible. I want to try to make points available alongside (or gradually replacing) separate x and y properties in the future, because it can make QML code more succinct: one binding instead of two, or not having to drill down twice to get a point twice so that you can call .x on it for one parameter and .y for the second.

      Attachments

        Issue Links

          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
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes