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

QFileSystemModel alignment in QTableView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 5.8.0
    • None

    Description

      When attach QFileSystemModel to QTableView we see that column with file size is aligned to top of the cell. Other cells aligned to vertical center. See screenshot for details.

      In source code qfilesystemmodel.cpp we see:

      QVariant QFileSystemModel::data(const QModelIndex &index, int role) const
      {
       ....
          case Qt::TextAlignmentRole:
              if (index.column() == 1)
                  return Qt::AlignRight;
              break;
      

      Need to correct it to

          return Qt::AlignRight | Qt::Qt::AlignVCenter;
      

      Now it is possible to fix with custom delegate for column, but is not good. Please fix it.

      Attachments

        Issue Links

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

          Activity

            People

              mmutz Marc Mutz
              keshav Konstantin Semenov
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes