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

Left-clicking in QSlider in modern Windows 11 style uses old Windows XP/Vista slider stepping behavior

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.2, 6.8.0 FF
    • 6.7.0
    • Widgets: Styles
    • None
    • Windows
    • 392c5fab8 (dev), 78bf5f7cc (6.7)

    Description

      The new Windows 11 style (qmodernwindowsstyle) uses the old Windows XP/Vista slider behavior where left-clicking on a QSlider uses the pageStep interval instead of setting the slider position to the absolute value where the user clicked. Native Windows 11 sliders (volume mixer, brightness, text size, etc.) always seem to use left-click to set the absolute value.

      This behavior made some sense for the old Windows Vista style, as XP-era sliders could have this stepping behavior (notably, the old Sound Settings). The new Windows 11 style seems like it would conform to Windows 11 behaviors like this. For what it's worth, the Mac style overrides this.

      https://github.com/qt/qtbase/blob/v6.7.0/src/widgets/styles/qcommonstyle.cpp#L5090-L5095
      https://github.com/qt/qtbase/blob/v6.7.0/src/plugins/styles/mac/qmacstyle_mac.mm#L2599-L2604
      https://github.com/qt/qtbase/blob/v6.7.0/src/plugins/styles/modernwindows/qwindows11style.cpp#L1683

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            rytoex Ryan Foster
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes