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

QHeaderView::setDefaultSectionSize different result then resizeSection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.0 Alpha
    • 5.11.1
    • Widgets: Itemviews
    • None
    • All
    • Linux/X11, macOS, Windows
    • faff43348bfae5cfc709fabe9d2698fc3063c050

    Description

      In a qtableview, calling

      verticalHeader()->setDefaultSectionSize(22)

      has not the same effect has

      for (int i = 0; i < verticalHeader()->count(); i++)
          verticalHeader()->resizeSection(i, 22);

      Try the annexed project resizeTable.zip, right click on the table and run "Launch resize", you should notice line 29 disappearing.

      Attachments

        1. resizeSection.png
          resizeSection.png
          23 kB
        2. setDefaultSectionSize.png
          setDefaultSectionSize.png
          24 kB
        3. resizeTable.zip
          4 kB
        4. image-2018-11-30-14-36-48-795.png
          image-2018-11-30-14-36-48-795.png
          4 kB
        5. image-2018-11-30-14-37-29-698.png
          image-2018-11-30-14-37-29-698.png
          4 kB
        6. image-2018-11-30-14-42-44-832.png
          image-2018-11-30-14-42-44-832.png
          6 kB
        7. image-2018-11-30-14-43-24-436.png
          image-2018-11-30-14-43-24-436.png
          4 kB
        8. qtbug69431.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            jirauser38076 user-4909d (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes