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

Status tip of QHeaderView is not consistent when hovering a section handle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.10, 5.11, 5.12, 5.13, 5.14, 5.15, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5
    • Widgets: Itemviews
    • None
    • All

    Description

      Since 5.10, when an item view has a model that returns valid StatusTipRole values from the headers, those values are displayed in the status bar (or anything that receives that event).

      This happens when the mouse does not hover a section handle or the section resize mode is not Interactive.

      If the resize mode is Interactive, when the mouse moves to a section handle the status tip is never updated. While the concept is fine, it has some inconsistencies.

      • if the mouse was in a section that had no status tip, or the previous hovered section was invalid, or the previous position was outside the header, the status tip is unchanged, even if the handle "belongs" to a section that does have a status tip;
      • if the mouse was in a section with a status tip, the tip is unchanged no matter if the previous hovered section was before or after the handle: if I have 2 rows with status tips for their header data, the same section handle between them will show "1" or "2" depending on the previous position;

      While this may seem trivial, it's not a consistent behavior: since a section handle always refers to the section that precedes it, it don't think it should show the status tip of the section after it.

      I can see three possible alternatives of improvement:

      • show the status tip of the section handle (the previous section) if it has any, otherwise clear it;
      • always clear the status tip when hovering a section handle;
      • check the status tip depending on the actual position within the handle: if it's greater than the PM_HeaderGripMargin (and it's not the last visible section), show the tip of the section after it, otherwise use the handle section.

      The third alternative may be the more appropriate, but that would probably require changing the returned result of sectionHandleAt() (which I'd also like to be made public, but that's another story).

      In any case, the status tip should always be checked/changed/cleared when hovering the section handle.

      Attachments

        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
            musicamante Maurizio Berti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes