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

QHeaderView::setResizeContentsPrecision(0) doesn't work for vertical header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.2.3
    • None
    • All

    Description

      Function QHeaderView::setResizeContentsPrecision() was designed to limit an amount of data used for view's cell size adjustments (to improve performance on large datasets).

      Usage of setResizeContentsPrecision(0) - with special value 0 - will take only visible area into account according to documentation. But it works only for horizontal headers and there are no hint about it in documentation. It says opposite insead that "This value is used in ... QTableView::sizeHintForRow()". So I propose to add this hint to current documentation.

      I'm reporting it as documentation bug as I see some people think it shouldn't work for vertical headers because scroll bar size will be incorrect. I personally disagree with it and think this is a bug in the feature implementation because scroll bar size may be calculated based on rows number not on row's sizes for this case (and also I tried to change row height dynamically calling setRowHeight() from models data() method - it works well and fast as it is called for visible rows only)

      So, probably it should be reclassified and fixed as a bug in QHeaderView::setResizeContentsPrecision() implementation to make secial value 0 applicable to vertical headers either.

      Attachments

        1. output.txt
          1 kB
        2. QTBUG-100818.py
          2 kB
        3. window.png
          window.png
          9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            richard Richard Moe Gustavsen
            starterkit Ivan Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes