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

QColumnView scroll code not working properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.6.3
    • Widgets: Itemviews
    • None
    • Ubuntu Linux 10.04, qt 4.6.3

    Description

      While with first two columns when you press left arrow or right arrow. It shifts column, but there is a lag in shifting the column.
      After some investigation I found out that the lag is almost equal to the ANIMATION_DURATION_MSEC macro defined at the top of qcolumnview.cpp. When I increased this value, the lag was very prominent.

      With some investigation I found out that this code creates the problem.

      // If it is already visible don't animate
      if (leftEdge > -horizontalOffset()
      && rightEdge <= ( horizontalOffset() + viewport()>size().width()))

      { d->columns.at(indexColumn)->scrollTo(index); d->_q_changeCurrentColumn(); return; }

      in my scenario i found out that the first condition in if was coming out to be 0 > -0, thus failing and animating the scroll value when it shouldn't.
      for me changing leftEdge >= -horizontalOffset() solved the issue. But I haven't looked at a lot of code in this file, I don't know whether this is the right approach to fix it.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            pritamghanghas Pritam Ghanghas
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes