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. setDefaultSectionSize.png
          24 kB
          user-4909d
        2. resizeTable.zip
          4 kB
          user-4909d
        3. resizeSection.png
          23 kB
          user-4909d
        4. qtbug69431.zip
          2 kB
          Adam Light
        5. image-2018-11-30-14-43-24-436.png
          4 kB
          Adam Light
        6. image-2018-11-30-14-42-44-832.png
          6 kB
          Adam Light
        7. image-2018-11-30-14-37-29-698.png
          4 kB
          Adam Light
        8. image-2018-11-30-14-36-48-795.png
          4 kB
          Adam Light
        For Gerrit Dashboard: QTBUG-69431
        # Subject Branch Project Status CR V

        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