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

PageIndicator API is broken by design

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • dev
    • Quick: Controls 2
    • None
    • All

    Description

      PageIndicator API and implementation details don't match each other. Furthermore, it is confusing to deal with its delegate/contentItem, and the way it uses context property makes it unreliable to implement in style override, and the way it operates on children items makes it impossible to even center horizontally!

      Some platforms like iOS 6 (I have no idea about later installments) allow tap on the sides to the left and right of dots to increment or decrement current index. This is also not possible to implement: (a) you can't wrap dots in a centered item, (b) even with an external wrapper and a MouseArea you still can't modify currentIndex without breaking any possible binding set by consumers.

      Another thing, which is more of a feature request, is that there is fundamentally no support for intermediate states and fractional index values. By this I mean 1:1 animations of "dots" morphing into each other as user swipes pages left or right. But I guess that would require a whole new SwipeView or something.

      Some of those thoughts I wrote down in comments in our style override in KDE QQC2 Desktop Style here:
      https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/264/diffs
      and centering with clickable areas came up in carousel / screenshots gallery in our app store here:

      https://invent.kde.org/plasma/discover/-/merge_requests/636/diffs#diff-content-3467bf09e4ffee64badf42264f54c17bf21a674d
      or here
      https://invent.kde.org/plasma/discover/-/blob/5e3b8581f87e063c7ad4104bbec13bca387ec99f/discover/qml/CarouselPageIndicator.qml

      (isn't merged yet at the time of writing, so don't know which link would survive)

      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
              ratijas ivan tkachenko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes