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

Scrolling bug of mouse wheel operation.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.8.1
    • 4.6.3, 4.7.1
    • None
    • Windows XP, Windows 7
    • 21b9d81d527f100e25a4c6dedaf423cdd8f6827c

    Description

      With the mouse control panel of Windows OS
      When you set the operation of one wheel scroll of the mouse every one page.
      The bug occurs.
      If wheel scroll up is executed, it becomes operation that is the down scrolling.
      It is generated by all scrolling widget.

      This bug seems to have begun to occur from version Qt4.6.
      The composition of function had changed compared with version Qt4.5 when the source was confirmed.

      ----------------------------------
      qabstractslider.cpp

      bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::KeyboardModifiers modifiers, int delta)
      ----------------------------------
      The description by above-mentioned function is a cause where the bug occurs.

      Detailed explanation.
      -----------------------------------------------------
      qreal stepsToScrollF =
      #ifndef QT_NO_WHEELEVENT
      QApplication::wheelScrollLines() *
      #endif
      offset * effectiveSingleStep();

      --------------------------------------------------------
      Cause of bug concrete the above-mentioned code.

      When you set the wheel operation by the setting of the mouse of windows OS every one page

      QApplication::wheelScrollLines() => 2147483647

      The malfunction is caused so that a very big value may enter QApplication::wheelScrollLines().

      When wheel scroll up is executed, contents of the variable "StepsToScroll" should be the values of the minus.
      However, the variable "StepsToScroll" reaches the value of the plus because of the mis-operation.

      An easy method of settlement is described in the following.
      -------------------------------------------------------
      qreal stepsToScrollF =
      #ifndef QT_NO_WHEELEVENT
      (QApplication::wheelScrollLines()<=10000?QApplication::wheelScrollLines():10000) *
      #endif
      offset * effectiveSingleStep();
      -------------------------------------------------------

      The value limited to 10000 is returned when QApplication::wheelScrollLines() is more than the value of 10000.

      Attachments

        Issue Links

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

          Activity

            People

              ppentika Pasi Pentikäinen
              tloft tloft
              Votes:
              5 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes