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

Mac: QHeaderView ignores vertical alignment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.3.0 Alpha
    • 5.15.6, 6.2.0
    • Widgets: Styles
    • None
    • macOS
    • 081a2b9b1f633fc54f6288a0ea5974a545035327 (qt/qtbase/dev)

    Description

      This is because in qmacstyle_mac.mm drawItemText explicitly sets Qt::AlignVCenter.

      case CE_HeaderLabel:
      ...
      proxy()->drawItemText(p, textr, header->textAlignment | Qt::AlignVCenter, header->palette,
                                        header->state.testFlag(State_Enabled), text, QPalette::ButtonText);
      

      Mac style:

      Fusion style:

      Also in Fusion style sort indicator looks messy.

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          267 kB
        2. screenshot-2.png
          screenshot-2.png
          266 kB
        3. test-table-view.zip
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            hellclown Dmitry Yelizarov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes