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

Common style calculates CT_HeaderSection size incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.12.0, 6.0.0
    • Widgets: Styles
    • None
    • All

    Description

      In "qcommonstyle.cpp', function "sizeFromContent(), under the case for CT_HeaderSection.

       

      When adding space for the sortIndicator, it uses the pixelMetrics for "PM_HeaderMargin" instead of "PM_HeaderMarkSize".   I think that's why the bottom indicator always seems to overlap the header section's content.

       if (hdr->sortIndicator != QStyleOptionHeader::None) {
           int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, hdr, widget);
           if (hdr->orientation == Qt::Horizontal)
               sz.rwidth() += sz.height() + margin;
           else
               sz.rheight() += sz.width() + margin;
           }
        }
      

      I think it affects all versions.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            mfilter Mfilter Qt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes