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

QHeaderView sort indicator arrows display in reversed order on Linux compared to other platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.0
    • Widgets: Itemviews
    • None
    • Linux/Wayland, Linux/X11

      TLDR: see this comment: https://github.com/metabrainz/picard/pull/2696#issuecomment-3153076894 and this commit: https://github.com/metabrainz/picard/commit/3039a01b417c49647d0f39388caa78221755934b

       

      SUMMARY:
      QHeaderView sort indicator arrows (^ for ascending, v for descending) are displayed in reversed order on Linux compared to Windows and macOS. This creates inconsistent user experience across platforms and requires application developers to implement platform-specific workarounds.

      STEPS TO REPRODUCE:
      1. Create a QTableView with sortable columns on Linux
      2. Click column headers to sort ascending/descending
      3. Observe the arrow indicators in the header
      4. Repeat the same test on Windows or macOS
      5. Compare the arrow directions between platforms

      EXPECTED BEHAVIOR:
      Sort indicator arrows should display consistently across all platforms:

      • ^ (up arrow) should indicate ascending sort
      • v (down arrow) should indicate descending sort

      ACTUAL BEHAVIOR:
      On Linux, the arrows appear reversed compared to other platforms, causing confusion for users and requiring developers to implement platform-specific sorting logic workarounds.

      PLATFORM INFORMATION:

      • Linux: Arrows are reversed
      • Windows: Arrows display correctly
      • macOS: Arrows display correctly

      IMPACT:
      This inconsistency forces application developers to implement platform-specific code to compensate for the reversed behavior, as seen in real-world applications like Picard (MusicBrainz tagger) where developers have added Linux-specific multipliers to their sorting logic.

      ADDITIONAL INFORMATION:
      This issue has been observed in PyQt applications and affects the user experience consistency across platforms. The workaround typically involves inverting sort logic on Linux systems, but this is not an ideal solution as it creates platform-specific code paths and potential maintenance issues.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            crissaegrim1 KYLE JOHNSON
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes